daapclient 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +36 -0
- data/EXAMPLES +79 -0
- data/LICENSE +340 -0
- data/NOTES +33 -0
- data/README +7 -31
- data/lib/net/daap.rb +34 -20
- data/lib/net/daap/album.rb +16 -0
- data/lib/net/daap/artist.rb +16 -0
- data/lib/net/daap/daap_version.rb +7 -0
- data/lib/net/daap/database.rb +54 -27
- data/lib/net/daap/dmap.rb +13 -24
- data/lib/net/daap/playlist.rb +4 -5
- data/lib/net/daap/song.rb +10 -8
- data/test/data/mt-daapd/02dd88de4b3a69c74bcc56c1acca9ae5.txt +0 -0
- data/test/data/mt-daapd/0de583b288d8ae30f89acb26d4c8535b.txt +0 -0
- data/test/data/mt-daapd/4146ec82a0f0a638db9293a0c2039e6b.txt +0 -0
- data/test/data/mt-daapd/51a2a6f2a53743bec7e79fe0d074dd28.txt +0 -0
- data/test/data/mt-daapd/6069971903eef3c8c71ec2c7b395bfeb.txt +0 -0
- data/test/data/mt-daapd/{e9a8e709c2116651157182f130207048.txt → 7102a16e834342b8264f1fb5226690e5.txt} +0 -0
- data/test/data/mt-daapd/9d29fb31969da7757fa2f4baa3a52fe9.txt +0 -0
- data/test/data/mt-daapd/a52dd33cc99471cc156528c06b22e709.txt +0 -0
- data/test/data/mt-daapd/a600829e59b3d719b32f25323a2719b0.txt +0 -0
- data/test/data/mt-daapd/e2552df8d742fe31d6cc6e1e41e496b3.txt +0 -0
- data/test/data/mt-daapd/fc631aa54b83344df9ccf1fbaa7684b0.txt +0 -0
- data/test/data/song_data.txt +0 -0
- data/test/data/song_structure.txt +209 -0
- data/test/mock_server.rb +56 -0
- data/test/server_saver.rb +31 -0
- data/test/tc_artists.rb +33 -0
- data/test/tc_client.rb +47 -116
- data/test/tc_download.rb +29 -0
- data/test/tc_playlist.rb +37 -0
- data/test/tc_protocol.rb +3 -0
- data/test/test_daap.rb +23 -0
- data/test/ts_daap.rb +7 -0
- metadata +41 -97
- data/doc/classes/Net.html +0 -127
- data/doc/classes/Net/DAAP.html +0 -168
- data/doc/classes/Net/DAAP/Client.html +0 -269
- data/doc/classes/Net/DAAP/Client.src/M000003.html +0 -20
- data/doc/classes/Net/DAAP/Client.src/M000004.html +0 -28
- data/doc/classes/Net/DAAP/Client.src/M000005.html +0 -33
- data/doc/classes/Net/DAAP/Client.src/M000006.html +0 -37
- data/doc/classes/Net/DAAP/Client.src/M000007.html +0 -20
- data/doc/classes/Net/DAAP/Client.src/M000008.html +0 -24
- data/doc/classes/Net/DAAP/Client.src/M000009.html +0 -18
- data/doc/classes/Net/DAAP/DAAPv2.html +0 -165
- data/doc/classes/Net/DAAP/DAAPv2.src/M000016.html +0 -30
- data/doc/classes/Net/DAAP/DAAPv2.src/M000017.html +0 -21
- data/doc/classes/Net/DAAP/DAAPv3.html +0 -178
- data/doc/classes/Net/DAAP/DAAPv3.src/M000018.html +0 -30
- data/doc/classes/Net/DAAP/DAAPv3.src/M000019.html +0 -23
- data/doc/classes/Net/DAAP/DMAP.html +0 -176
- data/doc/classes/Net/DAAP/DMAP.src/M000013.html +0 -20
- data/doc/classes/Net/DAAP/DMAP.src/M000014.html +0 -18
- data/doc/classes/Net/DAAP/DMAP.src/M000015.html +0 -24
- data/doc/classes/Net/DAAP/Database.html +0 -224
- data/doc/classes/Net/DAAP/Database.src/M000010.html +0 -25
- data/doc/classes/Net/DAAP/Database.src/M000011.html +0 -21
- data/doc/classes/Net/DAAP/Database.src/M000012.html +0 -35
- data/doc/classes/Net/DAAP/Playlist.html +0 -192
- data/doc/classes/Net/DAAP/Playlist.src/M000001.html +0 -24
- data/doc/classes/Net/DAAP/Playlist.src/M000002.html +0 -30
- data/doc/classes/Net/DAAP/Song.html +0 -208
- data/doc/classes/Net/DAAP/Song.src/M000020.html +0 -27
- data/doc/classes/Net/DAAP/Song.src/M000021.html +0 -19
- data/doc/created.rid +0 -1
- data/doc/files/CHANGELOG.html +0 -134
- data/doc/files/LICENSE.html +0 -531
- data/doc/files/README.html +0 -182
- data/doc/files/lib/net/daap/database_rb.html +0 -101
- data/doc/files/lib/net/daap/dmap_rb.html +0 -101
- data/doc/files/lib/net/daap/playlist_rb.html +0 -101
- data/doc/files/lib/net/daap/song_rb.html +0 -101
- data/doc/files/lib/net/daap_rb.html +0 -114
- data/doc/fr_class_index.html +0 -35
- data/doc/fr_file_index.html +0 -34
- data/doc/fr_method_index.html +0 -47
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
- data/lib/CVS/Entries +0 -1
- data/lib/CVS/Repository +0 -1
- data/lib/CVS/Root +0 -1
- data/lib/net/CVS/Entries +0 -2
- data/lib/net/CVS/Repository +0 -1
- data/lib/net/CVS/Root +0 -1
- data/lib/net/daap/CVS/Entries +0 -5
- data/lib/net/daap/CVS/Repository +0 -1
- data/lib/net/daap/CVS/Root +0 -1
- data/test/CVS/Entries +0 -4
- data/test/CVS/Repository +0 -1
- data/test/CVS/Root +0 -1
- data/test/data/CVS/Entries +0 -1
- data/test/data/CVS/Repository +0 -1
- data/test/data/CVS/Root +0 -1
- data/test/data/mt-daapd/079aca35773150da9fd98db10c7fd0c0.txt +0 -0
- data/test/data/mt-daapd/2972f65088b42a06b5d3ca089d71791d.txt +0 -0
- data/test/data/mt-daapd/440c2217e6207c54c317c296f71f9769.txt +0 -0
- data/test/data/mt-daapd/4d1ce9f941cbd823ed06f1f1baa5a3b9.txt +0 -0
- data/test/data/mt-daapd/7bded8b540fd082f102d25e181b47bc4.txt +0 -0
- data/test/data/mt-daapd/CVS/Entries +0 -11
- data/test/data/mt-daapd/CVS/Repository +0 -1
- data/test/data/mt-daapd/CVS/Root +0 -1
- data/test/data/mt-daapd/b3e894b87111bdba88e4765967f4b45a.txt +0 -0
- data/test/data/mt-daapd/d56b699830e77ba53855679cb1d252da.txt +0 -0
- data/test/data/mt-daapd/e61ce3062cb76770658896b778ad06cd.txt +0 -0
- data/test/data/mt-daapd/f9073959a0afacebfab7e3bf19c2714a.txt +0 -0
data/test/tc_download.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "test")
|
3
|
+
|
4
|
+
require 'test/unit'
|
5
|
+
require 'net/daap'
|
6
|
+
require 'mock_server'
|
7
|
+
|
8
|
+
class DAAPDownloadTest < Test::Unit::TestCase
|
9
|
+
def setup
|
10
|
+
@daap = Net::DAAP::Client.new(SERVER)
|
11
|
+
@daap.connect
|
12
|
+
end
|
13
|
+
|
14
|
+
def teardown
|
15
|
+
@daap.disconnect
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_get_song
|
19
|
+
song_data = nil
|
20
|
+
@daap.databases do |db|
|
21
|
+
db.songs.each do |song|
|
22
|
+
next unless song.artist.name == 'Idlewild'
|
23
|
+
next unless song.name == 'Hidden Track 2'
|
24
|
+
song_data = song.get
|
25
|
+
end
|
26
|
+
end
|
27
|
+
assert_equal(FILE_DATA, song_data)
|
28
|
+
end
|
29
|
+
end
|
data/test/tc_playlist.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "test")
|
3
|
+
|
4
|
+
require 'test/unit'
|
5
|
+
require 'net/daap'
|
6
|
+
require 'mock_server'
|
7
|
+
|
8
|
+
class DAAPClientPlaylistTest < Test::Unit::TestCase
|
9
|
+
def setup
|
10
|
+
@daap = Net::DAAP::Client.new(SERVER)
|
11
|
+
@daap.connect
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_playlist_name
|
15
|
+
playlists = @daap.databases[0].playlists
|
16
|
+
assert_equal(3, playlists.length)
|
17
|
+
assert_equal("Aaron's Music", playlists[0].name)
|
18
|
+
assert_equal("Recently Added", playlists[1].name)
|
19
|
+
assert_equal("Non-DRMed Music", playlists[2].name)
|
20
|
+
|
21
|
+
playlists.each do |pl|
|
22
|
+
#next unless pl.name == "Recently Added"
|
23
|
+
assert_equal(26, pl.songs.length)
|
24
|
+
songs_hash = Hash.new
|
25
|
+
pl.songs.each do |song|
|
26
|
+
songs_hash[song.id] = { :size => song.size, :album => song.album.to_s,
|
27
|
+
:name => song.name, :artist => song.artist.to_s, :format => song.format,
|
28
|
+
:persistentid => song.persistentid, :itemid => song.id }
|
29
|
+
end
|
30
|
+
assert_equal(HASH, songs_hash)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def teardown
|
35
|
+
@daap.disconnect
|
36
|
+
end
|
37
|
+
end
|
data/test/tc_protocol.rb
CHANGED
data/test/test_daap.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'yaml/stringio'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'test/unit/testsuite'
|
4
|
+
require 'test/unit/ui/reporter'
|
5
|
+
require 'test/unit/ui/console/testrunner'
|
6
|
+
|
7
|
+
fail "Missing results directory" if ARGV.empty?
|
8
|
+
html_dir = ARGV[0]
|
9
|
+
|
10
|
+
FileUtils.rm_r html_dir rescue nil
|
11
|
+
FileUtils.mkdir_p html_dir
|
12
|
+
|
13
|
+
Dir['tc_*.rb'].each do |fn|
|
14
|
+
load fn
|
15
|
+
end
|
16
|
+
|
17
|
+
suite = Test::Unit::TestSuite.new
|
18
|
+
ObjectSpace.each_object(Class) do |cls|
|
19
|
+
next if cls == Test::Unit::TestCase
|
20
|
+
suite << cls.suite if cls.respond_to?(:suite)
|
21
|
+
end
|
22
|
+
|
23
|
+
Test::Unit::UI::Reporter.run(suite, html_dir)
|
data/test/ts_daap.rb
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
2
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "test")
|
3
|
+
|
4
|
+
require 'yaml'
|
5
|
+
|
2
6
|
|
3
7
|
require 'test/unit'
|
4
8
|
require 'tc_client'
|
5
9
|
require 'tc_protocol'
|
10
|
+
require 'tc_playlist'
|
11
|
+
require 'tc_artists'
|
12
|
+
require 'tc_download'
|
6
13
|
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.11
|
3
3
|
specification_version: 1
|
4
4
|
name: daapclient
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date:
|
6
|
+
version: 0.2.0
|
7
|
+
date: 2006-05-11 00:00:00 -07:00
|
8
8
|
summary: Net::DAAP::Client is an iTunes share client.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -12,7 +12,7 @@ email: aaronp@rubyforge.org
|
|
12
12
|
homepage: daapclient.rubyforge.org
|
13
13
|
rubyforge_project: daapclient
|
14
14
|
description:
|
15
|
-
autorequire:
|
15
|
+
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
18
18
|
has_rdoc: true
|
@@ -24,119 +24,63 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
24
24
|
version: 0.0.0
|
25
25
|
version:
|
26
26
|
platform: ruby
|
27
|
+
signing_key:
|
28
|
+
cert_chain:
|
27
29
|
authors:
|
28
30
|
- Aaron Patterson
|
29
31
|
files:
|
30
|
-
- test/CVS
|
31
32
|
- test/data
|
33
|
+
- test/mock_server.rb
|
34
|
+
- test/server_saver.rb
|
35
|
+
- test/tc_artists.rb
|
32
36
|
- test/tc_client.rb
|
37
|
+
- test/tc_download.rb
|
38
|
+
- test/tc_playlist.rb
|
33
39
|
- test/tc_protocol.rb
|
40
|
+
- test/test_daap.rb
|
34
41
|
- test/ts_daap.rb
|
35
|
-
- test/CVS/Entries
|
36
|
-
- test/CVS/Repository
|
37
|
-
- test/CVS/Root
|
38
|
-
- test/data/CVS
|
39
42
|
- test/data/mt-daapd
|
40
|
-
- test/data/
|
41
|
-
- test/data/
|
42
|
-
- test/data/
|
43
|
-
- test/data/mt-daapd/
|
44
|
-
- test/data/mt-daapd/
|
45
|
-
- test/data/mt-daapd/
|
46
|
-
- test/data/mt-daapd/
|
47
|
-
- test/data/mt-daapd/
|
48
|
-
- test/data/mt-daapd/
|
49
|
-
- test/data/mt-daapd/
|
50
|
-
- test/data/mt-daapd/
|
51
|
-
- test/data/mt-daapd/
|
52
|
-
- test/data/mt-daapd/
|
53
|
-
- test/data/mt-daapd/f9073959a0afacebfab7e3bf19c2714a.txt
|
54
|
-
- test/data/mt-daapd/CVS/Entries
|
55
|
-
- test/data/mt-daapd/CVS/Repository
|
56
|
-
- test/data/mt-daapd/CVS/Root
|
57
|
-
- lib/CVS
|
43
|
+
- test/data/song_data.txt
|
44
|
+
- test/data/song_structure.txt
|
45
|
+
- test/data/mt-daapd/02dd88de4b3a69c74bcc56c1acca9ae5.txt
|
46
|
+
- test/data/mt-daapd/0de583b288d8ae30f89acb26d4c8535b.txt
|
47
|
+
- test/data/mt-daapd/4146ec82a0f0a638db9293a0c2039e6b.txt
|
48
|
+
- test/data/mt-daapd/51a2a6f2a53743bec7e79fe0d074dd28.txt
|
49
|
+
- test/data/mt-daapd/6069971903eef3c8c71ec2c7b395bfeb.txt
|
50
|
+
- test/data/mt-daapd/7102a16e834342b8264f1fb5226690e5.txt
|
51
|
+
- test/data/mt-daapd/9d29fb31969da7757fa2f4baa3a52fe9.txt
|
52
|
+
- test/data/mt-daapd/a52dd33cc99471cc156528c06b22e709.txt
|
53
|
+
- test/data/mt-daapd/a600829e59b3d719b32f25323a2719b0.txt
|
54
|
+
- test/data/mt-daapd/e2552df8d742fe31d6cc6e1e41e496b3.txt
|
55
|
+
- test/data/mt-daapd/fc631aa54b83344df9ccf1fbaa7684b0.txt
|
58
56
|
- lib/net
|
59
|
-
- lib/CVS/Entries
|
60
|
-
- lib/CVS/Repository
|
61
|
-
- lib/CVS/Root
|
62
|
-
- lib/net/CVS
|
63
57
|
- lib/net/daap
|
64
58
|
- lib/net/daap.rb
|
65
|
-
- lib/net/
|
66
|
-
- lib/net/
|
67
|
-
- lib/net/
|
68
|
-
- lib/net/daap/CVS
|
59
|
+
- lib/net/daap/album.rb
|
60
|
+
- lib/net/daap/artist.rb
|
61
|
+
- lib/net/daap/daap_version.rb
|
69
62
|
- lib/net/daap/database.rb
|
70
63
|
- lib/net/daap/dmap.rb
|
71
64
|
- lib/net/daap/playlist.rb
|
72
65
|
- lib/net/daap/song.rb
|
73
|
-
- lib/net/daap/CVS/Entries
|
74
|
-
- lib/net/daap/CVS/Repository
|
75
|
-
- lib/net/daap/CVS/Root
|
76
|
-
- doc/classes
|
77
|
-
- doc/created.rid
|
78
|
-
- doc/files
|
79
|
-
- doc/fr_class_index.html
|
80
|
-
- doc/fr_file_index.html
|
81
|
-
- doc/fr_method_index.html
|
82
|
-
- doc/index.html
|
83
|
-
- doc/rdoc-style.css
|
84
|
-
- doc/classes/Net
|
85
|
-
- doc/classes/Net.html
|
86
|
-
- doc/classes/Net/DAAP
|
87
|
-
- doc/classes/Net/DAAP.html
|
88
|
-
- doc/classes/Net/DAAP/Client.html
|
89
|
-
- doc/classes/Net/DAAP/Client.src
|
90
|
-
- doc/classes/Net/DAAP/DAAPv2.html
|
91
|
-
- doc/classes/Net/DAAP/DAAPv2.src
|
92
|
-
- doc/classes/Net/DAAP/DAAPv3.html
|
93
|
-
- doc/classes/Net/DAAP/DAAPv3.src
|
94
|
-
- doc/classes/Net/DAAP/Database.html
|
95
|
-
- doc/classes/Net/DAAP/Database.src
|
96
|
-
- doc/classes/Net/DAAP/DMAP.html
|
97
|
-
- doc/classes/Net/DAAP/DMAP.src
|
98
|
-
- doc/classes/Net/DAAP/Playlist.html
|
99
|
-
- doc/classes/Net/DAAP/Playlist.src
|
100
|
-
- doc/classes/Net/DAAP/Song.html
|
101
|
-
- doc/classes/Net/DAAP/Song.src
|
102
|
-
- doc/classes/Net/DAAP/Client.src/M000003.html
|
103
|
-
- doc/classes/Net/DAAP/Client.src/M000004.html
|
104
|
-
- doc/classes/Net/DAAP/Client.src/M000005.html
|
105
|
-
- doc/classes/Net/DAAP/Client.src/M000006.html
|
106
|
-
- doc/classes/Net/DAAP/Client.src/M000007.html
|
107
|
-
- doc/classes/Net/DAAP/Client.src/M000008.html
|
108
|
-
- doc/classes/Net/DAAP/Client.src/M000009.html
|
109
|
-
- doc/classes/Net/DAAP/DAAPv2.src/M000016.html
|
110
|
-
- doc/classes/Net/DAAP/DAAPv2.src/M000017.html
|
111
|
-
- doc/classes/Net/DAAP/DAAPv3.src/M000018.html
|
112
|
-
- doc/classes/Net/DAAP/DAAPv3.src/M000019.html
|
113
|
-
- doc/classes/Net/DAAP/Database.src/M000010.html
|
114
|
-
- doc/classes/Net/DAAP/Database.src/M000011.html
|
115
|
-
- doc/classes/Net/DAAP/Database.src/M000012.html
|
116
|
-
- doc/classes/Net/DAAP/DMAP.src/M000013.html
|
117
|
-
- doc/classes/Net/DAAP/DMAP.src/M000014.html
|
118
|
-
- doc/classes/Net/DAAP/DMAP.src/M000015.html
|
119
|
-
- doc/classes/Net/DAAP/Playlist.src/M000001.html
|
120
|
-
- doc/classes/Net/DAAP/Playlist.src/M000002.html
|
121
|
-
- doc/classes/Net/DAAP/Song.src/M000020.html
|
122
|
-
- doc/classes/Net/DAAP/Song.src/M000021.html
|
123
|
-
- doc/files/CHANGELOG.html
|
124
|
-
- doc/files/lib
|
125
|
-
- doc/files/LICENSE.html
|
126
|
-
- doc/files/README.html
|
127
|
-
- doc/files/lib/net
|
128
|
-
- doc/files/lib/net/daap
|
129
|
-
- doc/files/lib/net/daap_rb.html
|
130
|
-
- doc/files/lib/net/daap/database_rb.html
|
131
|
-
- doc/files/lib/net/daap/dmap_rb.html
|
132
|
-
- doc/files/lib/net/daap/playlist_rb.html
|
133
|
-
- doc/files/lib/net/daap/song_rb.html
|
134
66
|
- README
|
67
|
+
- LICENSE
|
68
|
+
- CHANGELOG
|
69
|
+
- EXAMPLES
|
70
|
+
- NOTES
|
135
71
|
test_files:
|
136
72
|
- test/ts_daap.rb
|
137
|
-
rdoc_options:
|
73
|
+
rdoc_options:
|
74
|
+
- "--main"
|
75
|
+
- README
|
76
|
+
- "--title"
|
77
|
+
- "'Net::DAAP::Client RDoc'"
|
138
78
|
extra_rdoc_files:
|
139
79
|
- README
|
80
|
+
- LICENSE
|
81
|
+
- CHANGELOG
|
82
|
+
- EXAMPLES
|
83
|
+
- NOTES
|
140
84
|
executables: []
|
141
85
|
extensions: []
|
142
86
|
requirements: []
|
data/doc/classes/Net.html
DELETED
@@ -1,127 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: Net</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">Net</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/net/daap/database_rb.html">
|
59
|
-
lib/net/daap/database.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../files/lib/net/daap/dmap_rb.html">
|
63
|
-
lib/net/daap/dmap.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
<a href="../files/lib/net/daap/playlist_rb.html">
|
67
|
-
lib/net/daap/playlist.rb
|
68
|
-
</a>
|
69
|
-
<br />
|
70
|
-
<a href="../files/lib/net/daap/song_rb.html">
|
71
|
-
lib/net/daap/song.rb
|
72
|
-
</a>
|
73
|
-
<br />
|
74
|
-
<a href="../files/lib/net/daap_rb.html">
|
75
|
-
lib/net/daap.rb
|
76
|
-
</a>
|
77
|
-
<br />
|
78
|
-
</td>
|
79
|
-
</tr>
|
80
|
-
|
81
|
-
</table>
|
82
|
-
</div>
|
83
|
-
<!-- banner header -->
|
84
|
-
|
85
|
-
<div id="bodyContent">
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
<div id="contextContent">
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
</div>
|
94
|
-
|
95
|
-
|
96
|
-
</div>
|
97
|
-
|
98
|
-
|
99
|
-
<!-- if includes -->
|
100
|
-
|
101
|
-
<div id="section">
|
102
|
-
|
103
|
-
<div id="class-list">
|
104
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
105
|
-
|
106
|
-
Module <a href="Net/DAAP.html" class="link">Net::DAAP</a><br />
|
107
|
-
|
108
|
-
</div>
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
<!-- if method_list -->
|
117
|
-
|
118
|
-
|
119
|
-
</div>
|
120
|
-
|
121
|
-
|
122
|
-
<div id="validator-badges">
|
123
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
124
|
-
</div>
|
125
|
-
|
126
|
-
</body>
|
127
|
-
</html>
|
data/doc/classes/Net/DAAP.html
DELETED
@@ -1,168 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: Net::DAAP</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">Net::DAAP</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/net/daap/database_rb.html">
|
59
|
-
lib/net/daap/database.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../../files/lib/net/daap/dmap_rb.html">
|
63
|
-
lib/net/daap/dmap.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
<a href="../../files/lib/net/daap/playlist_rb.html">
|
67
|
-
lib/net/daap/playlist.rb
|
68
|
-
</a>
|
69
|
-
<br />
|
70
|
-
<a href="../../files/lib/net/daap/song_rb.html">
|
71
|
-
lib/net/daap/song.rb
|
72
|
-
</a>
|
73
|
-
<br />
|
74
|
-
<a href="../../files/lib/net/daap_rb.html">
|
75
|
-
lib/net/daap.rb
|
76
|
-
</a>
|
77
|
-
<br />
|
78
|
-
</td>
|
79
|
-
</tr>
|
80
|
-
|
81
|
-
</table>
|
82
|
-
</div>
|
83
|
-
<!-- banner header -->
|
84
|
-
|
85
|
-
<div id="bodyContent">
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
<div id="contextContent">
|
90
|
-
|
91
|
-
<div id="description">
|
92
|
-
<h1>Synopsis</h1>
|
93
|
-
<p>
|
94
|
-
The <a href="DAAP.html">DAAP</a> library is used for browsing an iTunes
|
95
|
-
share. Make sure that Digest::M4P is installed before using this library.
|
96
|
-
</p>
|
97
|
-
<h2>Example</h2>
|
98
|
-
<pre>
|
99
|
-
require 'rubygems'
|
100
|
-
require 'net/daap'
|
101
|
-
|
102
|
-
daap = Net::DAAP::Client.new('localhost')
|
103
|
-
daap.connect do |dsn|
|
104
|
-
|
105
|
-
daap.databases do |db|
|
106
|
-
puts "All songs in the database"
|
107
|
-
db.songs do |song|
|
108
|
-
puts "#{song.artist} - #{song.name}"
|
109
|
-
end
|
110
|
-
|
111
|
-
puts "Songs for each playlist"
|
112
|
-
db.playlists do |pl|
|
113
|
-
puts "Playlist name: #{pl.name}"
|
114
|
-
pl.songs do |song|
|
115
|
-
puts "#{song.artist} - #{song.name}"
|
116
|
-
File::open("dl/#{song.artist} - #{song.name}.#{song.format}", "w") do |f|
|
117
|
-
f << song.get
|
118
|
-
end
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|
122
|
-
end
|
123
|
-
</pre>
|
124
|
-
|
125
|
-
</div>
|
126
|
-
|
127
|
-
|
128
|
-
</div>
|
129
|
-
|
130
|
-
|
131
|
-
</div>
|
132
|
-
|
133
|
-
|
134
|
-
<!-- if includes -->
|
135
|
-
|
136
|
-
<div id="section">
|
137
|
-
|
138
|
-
<div id="class-list">
|
139
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
140
|
-
|
141
|
-
Class <a href="DAAP/Client.html" class="link">Net::DAAP::Client</a><br />
|
142
|
-
Class <a href="DAAP/DAAPv2.html" class="link">Net::DAAP::DAAPv2</a><br />
|
143
|
-
Class <a href="DAAP/DAAPv3.html" class="link">Net::DAAP::DAAPv3</a><br />
|
144
|
-
Class <a href="DAAP/DMAP.html" class="link">Net::DAAP::DMAP</a><br />
|
145
|
-
Class <a href="DAAP/Database.html" class="link">Net::DAAP::Database</a><br />
|
146
|
-
Class <a href="DAAP/Playlist.html" class="link">Net::DAAP::Playlist</a><br />
|
147
|
-
Class <a href="DAAP/Song.html" class="link">Net::DAAP::Song</a><br />
|
148
|
-
|
149
|
-
</div>
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
<!-- if method_list -->
|
158
|
-
|
159
|
-
|
160
|
-
</div>
|
161
|
-
|
162
|
-
|
163
|
-
<div id="validator-badges">
|
164
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
165
|
-
</div>
|
166
|
-
|
167
|
-
</body>
|
168
|
-
</html>
|