daapclient 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +8 -13
- data/doc/classes/Net.html +127 -0
- data/doc/classes/Net/DAAP.html +168 -0
- data/doc/classes/Net/DAAP/Client.html +269 -0
- data/doc/classes/Net/DAAP/Client.src/M000003.html +20 -0
- data/doc/classes/Net/DAAP/Client.src/M000004.html +28 -0
- data/doc/classes/Net/DAAP/Client.src/M000005.html +33 -0
- data/doc/classes/Net/DAAP/Client.src/M000006.html +37 -0
- data/doc/classes/Net/DAAP/Client.src/M000007.html +20 -0
- data/doc/classes/Net/DAAP/Client.src/M000008.html +24 -0
- data/doc/classes/Net/DAAP/Client.src/M000009.html +18 -0
- data/doc/classes/Net/DAAP/DAAPv2.html +165 -0
- data/doc/classes/Net/DAAP/DAAPv2.src/M000016.html +30 -0
- data/doc/classes/Net/DAAP/DAAPv2.src/M000017.html +21 -0
- data/doc/classes/Net/DAAP/DAAPv3.html +178 -0
- data/doc/classes/Net/DAAP/DAAPv3.src/M000018.html +30 -0
- data/doc/classes/Net/DAAP/DAAPv3.src/M000019.html +23 -0
- data/doc/classes/Net/DAAP/DMAP.html +176 -0
- data/doc/classes/Net/DAAP/DMAP.src/M000013.html +20 -0
- data/doc/classes/Net/DAAP/DMAP.src/M000014.html +18 -0
- data/doc/classes/Net/DAAP/DMAP.src/M000015.html +24 -0
- data/doc/classes/Net/DAAP/Database.html +224 -0
- data/doc/classes/Net/DAAP/Database.src/M000010.html +25 -0
- data/doc/classes/Net/DAAP/Database.src/M000011.html +21 -0
- data/doc/classes/Net/DAAP/Database.src/M000012.html +35 -0
- data/doc/classes/Net/DAAP/Playlist.html +192 -0
- data/doc/classes/Net/DAAP/Playlist.src/M000001.html +24 -0
- data/doc/classes/Net/DAAP/Playlist.src/M000002.html +30 -0
- data/doc/classes/Net/DAAP/Song.html +208 -0
- data/doc/classes/Net/DAAP/Song.src/M000020.html +27 -0
- data/doc/classes/Net/DAAP/Song.src/M000021.html +19 -0
- data/doc/created.rid +1 -0
- data/doc/files/CHANGELOG.html +134 -0
- data/doc/files/LICENSE.html +531 -0
- data/doc/files/README.html +182 -0
- data/doc/files/lib/net/daap/database_rb.html +101 -0
- data/doc/files/lib/net/daap/dmap_rb.html +101 -0
- data/doc/files/lib/net/daap/playlist_rb.html +101 -0
- data/doc/files/lib/net/daap/song_rb.html +101 -0
- data/doc/files/lib/net/daap_rb.html +114 -0
- data/doc/fr_class_index.html +35 -0
- data/doc/fr_file_index.html +34 -0
- data/doc/fr_method_index.html +47 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/net/CVS/Entries +1 -1
- data/lib/net/daap.rb +4 -4
- data/lib/net/daap/CVS/Entries +1 -1
- data/lib/net/daap/song.rb +2 -2
- metadata +60 -3
- data/lib/itunes_sync.rb +0 -19
@@ -0,0 +1,182 @@
|
|
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>File: README</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="fileHeader">
|
50
|
+
<h1>README</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>README
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Fri Dec 16 13:16:07 PST 2005</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
<div id="description">
|
72
|
+
<h1><a href="../classes/Net/DAAP.html">Net::DAAP</a></h1>
|
73
|
+
<p>
|
74
|
+
This library is used for browsing iTunes DAAP servers.
|
75
|
+
</p>
|
76
|
+
<p>
|
77
|
+
Most of this is based off the work in the perl version by Richard Clamp
|
78
|
+
which can be found here:
|
79
|
+
</p>
|
80
|
+
<p>
|
81
|
+
<a href="http://search.cpan.org/~rclamp">search.cpan.org/~rclamp</a>/
|
82
|
+
</p>
|
83
|
+
<p>
|
84
|
+
Ruby version is by Aaron Patterson <aaronp@rubyforge.org>
|
85
|
+
</p>
|
86
|
+
<h2>Installation</h2>
|
87
|
+
<p>
|
88
|
+
Make sure that Digest::M4P is installed before using this package.
|
89
|
+
Digest::M4P is available on the daap client ruby forge site:
|
90
|
+
</p>
|
91
|
+
<p>
|
92
|
+
<a
|
93
|
+
href="http://rubyforge.org/frs/?group_id=1155">rubyforge.org/frs/?group_id=1155</a>
|
94
|
+
</p>
|
95
|
+
<p>
|
96
|
+
Digest::M4P has not been turned in to a Ruby gem as of this writing.
|
97
|
+
</p>
|
98
|
+
<p>
|
99
|
+
After that, just install the gem:
|
100
|
+
</p>
|
101
|
+
<pre>
|
102
|
+
sudo gem install daapclient
|
103
|
+
</pre>
|
104
|
+
<p>
|
105
|
+
Also, check out the project page:
|
106
|
+
</p>
|
107
|
+
<p>
|
108
|
+
<a
|
109
|
+
href="http://rubyforge.org/projects/daapclient">rubyforge.org/projects/daapclient</a>
|
110
|
+
</p>
|
111
|
+
<h2>Example Usage</h2>
|
112
|
+
<pre>
|
113
|
+
require 'net/daap'
|
114
|
+
require 'fileutils'
|
115
|
+
|
116
|
+
daap = Net::DAAP::Client.new('localhost')
|
117
|
+
|
118
|
+
daap.connect do |dsn|
|
119
|
+
daap.databases do |db|
|
120
|
+
puts "All songs in the database"
|
121
|
+
db.songs do |song|
|
122
|
+
filename = "#{song.artist} - #{song.name}.#{song.format}"
|
123
|
+
directory = "db/#{song.album}"
|
124
|
+
FileUtils::mkdir_p(directory)
|
125
|
+
|
126
|
+
File.open("#{directory}/#{filename}", "w") do |f|
|
127
|
+
song.get { |str| f.write str }
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
</pre>
|
133
|
+
<h2>Acknowledgements</h2>
|
134
|
+
<p>
|
135
|
+
The library is mostly a port of the Perl library, and owes most of its
|
136
|
+
communication logic to the original Perl version by Richard Clamp.
|
137
|
+
</p>
|
138
|
+
<h2>Author</h2>
|
139
|
+
<p>
|
140
|
+
This Ruby version is Copyright © Aaron Patterson 2005
|
141
|
+
</p>
|
142
|
+
<p>
|
143
|
+
It also comes with a shameless plug for employment coding Ruby, my most
|
144
|
+
favorite language! ;-)
|
145
|
+
</p>
|
146
|
+
<h2>License</h2>
|
147
|
+
<p>
|
148
|
+
This library is distributed under the GPL. Please see the LICENSE file.
|
149
|
+
</p>
|
150
|
+
|
151
|
+
</div>
|
152
|
+
|
153
|
+
|
154
|
+
</div>
|
155
|
+
|
156
|
+
|
157
|
+
</div>
|
158
|
+
|
159
|
+
|
160
|
+
<!-- if includes -->
|
161
|
+
|
162
|
+
<div id="section">
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<!-- if method_list -->
|
172
|
+
|
173
|
+
|
174
|
+
</div>
|
175
|
+
|
176
|
+
|
177
|
+
<div id="validator-badges">
|
178
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
179
|
+
</div>
|
180
|
+
|
181
|
+
</body>
|
182
|
+
</html>
|
@@ -0,0 +1,101 @@
|
|
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>File: database.rb</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="fileHeader">
|
50
|
+
<h1>database.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/net/daap/database.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Wed Dec 07 15:25:52 PST 2005</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- if includes -->
|
80
|
+
|
81
|
+
<div id="section">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if method_list -->
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<div id="validator-badges">
|
97
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</body>
|
101
|
+
</html>
|
@@ -0,0 +1,101 @@
|
|
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>File: dmap.rb</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="fileHeader">
|
50
|
+
<h1>dmap.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/net/daap/dmap.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Fri Dec 09 14:45:05 PST 2005</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- if includes -->
|
80
|
+
|
81
|
+
<div id="section">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if method_list -->
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<div id="validator-badges">
|
97
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</body>
|
101
|
+
</html>
|
@@ -0,0 +1,101 @@
|
|
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>File: playlist.rb</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="fileHeader">
|
50
|
+
<h1>playlist.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/net/daap/playlist.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Wed Dec 07 15:25:52 PST 2005</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- if includes -->
|
80
|
+
|
81
|
+
<div id="section">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if method_list -->
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<div id="validator-badges">
|
97
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</body>
|
101
|
+
</html>
|