daapclient 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +9 -1
- data/lib/itunes_sync.rb +19 -0
- data/lib/net/CVS/Entries +1 -1
- data/lib/net/daap/CVS/Entries +1 -1
- data/lib/net/daap/dmap.rb +42 -13
- data/lib/net/daap.rb +13 -9
- metadata +61 -123
- data/doc/classes/Net/DAAP/Client.html +0 -251
- data/doc/classes/Net/DAAP/Client.src/M000003.html +0 -20
- data/doc/classes/Net/DAAP/Client.src/M000004.html +0 -25
- 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/DAAPv2.html +0 -165
- data/doc/classes/Net/DAAP/DAAPv2.src/M000015.html +0 -30
- data/doc/classes/Net/DAAP/DAAPv2.src/M000016.html +0 -21
- data/doc/classes/Net/DAAP/DAAPv3.html +0 -178
- data/doc/classes/Net/DAAP/DAAPv3.src/M000017.html +0 -30
- data/doc/classes/Net/DAAP/DAAPv3.src/M000018.html +0 -23
- data/doc/classes/Net/DAAP/DMAP.html +0 -189
- data/doc/classes/Net/DAAP/DMAP.src/M000012.html +0 -20
- data/doc/classes/Net/DAAP/DMAP.src/M000013.html +0 -18
- data/doc/classes/Net/DAAP/DMAP.src/M000014.html +0 -24
- data/doc/classes/Net/DAAP/Database.html +0 -224
- data/doc/classes/Net/DAAP/Database.src/M000009.html +0 -25
- data/doc/classes/Net/DAAP/Database.src/M000010.html +0 -21
- data/doc/classes/Net/DAAP/Database.src/M000011.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/M000019.html +0 -27
- data/doc/classes/Net/DAAP/Song.src/M000020.html +0 -19
- data/doc/classes/Net/DAAP.html +0 -168
- data/doc/classes/Net.html +0 -127
- data/doc/created.rid +0 -1
- data/doc/files/CHANGELOG.html +0 -110
- data/doc/files/LICENSE.html +0 -531
- data/doc/files/README.html +0 -176
- 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 -46
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
@@ -1,192 +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>Class: Net::DAAP::Playlist</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>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Net::DAAP::Playlist</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../files/lib/net/daap/playlist_rb.html">
|
59
|
-
lib/net/daap/playlist.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
Object
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
|
81
|
-
<div id="description">
|
82
|
-
<p>
|
83
|
-
This class contains information about playlists returned from the iTunes
|
84
|
-
server.
|
85
|
-
</p>
|
86
|
-
|
87
|
-
</div>
|
88
|
-
|
89
|
-
|
90
|
-
</div>
|
91
|
-
|
92
|
-
<div id="method-list">
|
93
|
-
<h3 class="section-bar">Methods</h3>
|
94
|
-
|
95
|
-
<div class="name-list">
|
96
|
-
<a href="#M000001">new</a>
|
97
|
-
<a href="#M000002">songs</a>
|
98
|
-
</div>
|
99
|
-
</div>
|
100
|
-
|
101
|
-
</div>
|
102
|
-
|
103
|
-
|
104
|
-
<!-- if includes -->
|
105
|
-
|
106
|
-
<div id="section">
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
<div id="attribute-list">
|
113
|
-
<h3 class="section-bar">Attributes</h3>
|
114
|
-
|
115
|
-
<div class="name-list">
|
116
|
-
<table>
|
117
|
-
<tr class="top-aligned-row context-row">
|
118
|
-
<td class="context-item-name">id</td>
|
119
|
-
<td class="context-item-value"> [R] </td>
|
120
|
-
<td class="context-item-desc"></td>
|
121
|
-
</tr>
|
122
|
-
<tr class="top-aligned-row context-row">
|
123
|
-
<td class="context-item-name">itemcount</td>
|
124
|
-
<td class="context-item-value"> [R] </td>
|
125
|
-
<td class="context-item-desc"></td>
|
126
|
-
</tr>
|
127
|
-
<tr class="top-aligned-row context-row">
|
128
|
-
<td class="context-item-name">name</td>
|
129
|
-
<td class="context-item-value"> [R] </td>
|
130
|
-
<td class="context-item-desc"></td>
|
131
|
-
</tr>
|
132
|
-
<tr class="top-aligned-row context-row">
|
133
|
-
<td class="context-item-name">persistentid</td>
|
134
|
-
<td class="context-item-value"> [R] </td>
|
135
|
-
<td class="context-item-desc"></td>
|
136
|
-
</tr>
|
137
|
-
</table>
|
138
|
-
</div>
|
139
|
-
</div>
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
<!-- if method_list -->
|
144
|
-
<div id="methods">
|
145
|
-
<h3 class="section-bar">Public Class methods</h3>
|
146
|
-
|
147
|
-
<div id="method-M000001" class="method-detail">
|
148
|
-
<a name="M000001"></a>
|
149
|
-
|
150
|
-
<div class="method-heading">
|
151
|
-
<a href="Playlist.src/M000001.html" target="Code" class="method-signature"
|
152
|
-
onclick="popupCode('Playlist.src/M000001.html');return false;">
|
153
|
-
<span class="method-name">new</span><span class="method-args">(args)</span>
|
154
|
-
</a>
|
155
|
-
</div>
|
156
|
-
|
157
|
-
<div class="method-description">
|
158
|
-
</div>
|
159
|
-
</div>
|
160
|
-
|
161
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
162
|
-
|
163
|
-
<div id="method-M000002" class="method-detail">
|
164
|
-
<a name="M000002"></a>
|
165
|
-
|
166
|
-
<div class="method-heading">
|
167
|
-
<a href="Playlist.src/M000002.html" target="Code" class="method-signature"
|
168
|
-
onclick="popupCode('Playlist.src/M000002.html');return false;">
|
169
|
-
<span class="method-name">songs</span><span class="method-args">() {|@db.songs.find { |s| s.id == value['dmap.itemid']| ...}</span>
|
170
|
-
</a>
|
171
|
-
</div>
|
172
|
-
|
173
|
-
<div class="method-description">
|
174
|
-
<p>
|
175
|
-
Returns a list of songs associated with this playlist.
|
176
|
-
</p>
|
177
|
-
</div>
|
178
|
-
</div>
|
179
|
-
|
180
|
-
|
181
|
-
</div>
|
182
|
-
|
183
|
-
|
184
|
-
</div>
|
185
|
-
|
186
|
-
|
187
|
-
<div id="validator-badges">
|
188
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
189
|
-
</div>
|
190
|
-
|
191
|
-
</body>
|
192
|
-
</html>
|
@@ -1,24 +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>
|
7
|
-
<head>
|
8
|
-
<title>new (Net::DAAP::Playlist)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/net/daap/playlist.rb, line 8</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
|
15
|
-
<span class="ruby-identifier">info</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:pl_info</span>]
|
16
|
-
<span class="ruby-ivar">@itemcount</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'dmap.itemcount'</span>]
|
17
|
-
<span class="ruby-ivar">@persistentid</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'dmap.persistentid'</span>]
|
18
|
-
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'dmap.itemname'</span>]
|
19
|
-
<span class="ruby-ivar">@id</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'dmap.itemid'</span>]
|
20
|
-
<span class="ruby-ivar">@daap</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:daap</span>]
|
21
|
-
<span class="ruby-ivar">@db</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:db</span>]
|
22
|
-
<span class="ruby-keyword kw">end</span></pre>
|
23
|
-
</body>
|
24
|
-
</html>
|
@@ -1,30 +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>
|
7
|
-
<head>
|
8
|
-
<title>songs (Net::DAAP::Playlist)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/net/daap/playlist.rb, line 19</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">songs</span>
|
15
|
-
<span class="ruby-identifier">path</span> = <span class="ruby-node">"databases/#{@db.id}/containers/#{@id}/items?type=music&meta=dmap.itemkind,dmap.itemid,dmap.containeritemid"</span>
|
16
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-ivar">@daap</span>.<span class="ruby-identifier">do_get</span>(<span class="ruby-identifier">path</span>)
|
17
|
-
<span class="ruby-identifier">listings</span> = <span class="ruby-ivar">@daap</span>.<span class="ruby-identifier">dmap</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">result</span>,
|
18
|
-
<span class="ruby-value str">"daap.playlistsongs/dmap.listing"</span>)
|
19
|
-
<span class="ruby-identifier">songs</span> = []
|
20
|
-
<span class="ruby-ivar">@daap</span>.<span class="ruby-identifier">unpack_listing</span>(<span class="ruby-identifier">listings</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
21
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
22
|
-
<span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@db</span>.<span class="ruby-identifier">songs</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">id</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">value</span>[<span class="ruby-value str">'dmap.itemid'</span>] }
|
23
|
-
<span class="ruby-keyword kw">else</span>
|
24
|
-
<span class="ruby-identifier">songs</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@db</span>.<span class="ruby-identifier">songs</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">id</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">value</span>[<span class="ruby-value str">'dmap.itemid'</span>] }
|
25
|
-
<span class="ruby-keyword kw">end</span>
|
26
|
-
<span class="ruby-keyword kw">end</span>
|
27
|
-
<span class="ruby-identifier">songs</span>
|
28
|
-
<span class="ruby-keyword kw">end</span></pre>
|
29
|
-
</body>
|
30
|
-
</html>
|
@@ -1,208 +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>Class: Net::DAAP::Song</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>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Net::DAAP::Song</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../files/lib/net/daap/song_rb.html">
|
59
|
-
lib/net/daap/song.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
Object
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
|
81
|
-
<div id="description">
|
82
|
-
<p>
|
83
|
-
This class contains song information returned from the <a
|
84
|
-
href="../DAAP.html">DAAP</a> server.
|
85
|
-
</p>
|
86
|
-
|
87
|
-
</div>
|
88
|
-
|
89
|
-
|
90
|
-
</div>
|
91
|
-
|
92
|
-
<div id="method-list">
|
93
|
-
<h3 class="section-bar">Methods</h3>
|
94
|
-
|
95
|
-
<div class="name-list">
|
96
|
-
<a href="#M000020">get</a>
|
97
|
-
<a href="#M000019">new</a>
|
98
|
-
</div>
|
99
|
-
</div>
|
100
|
-
|
101
|
-
</div>
|
102
|
-
|
103
|
-
|
104
|
-
<!-- if includes -->
|
105
|
-
|
106
|
-
<div id="section">
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
<div id="attribute-list">
|
113
|
-
<h3 class="section-bar">Attributes</h3>
|
114
|
-
|
115
|
-
<div class="name-list">
|
116
|
-
<table>
|
117
|
-
<tr class="top-aligned-row context-row">
|
118
|
-
<td class="context-item-name">album</td>
|
119
|
-
<td class="context-item-value"> [R] </td>
|
120
|
-
<td class="context-item-desc"></td>
|
121
|
-
</tr>
|
122
|
-
<tr class="top-aligned-row context-row">
|
123
|
-
<td class="context-item-name">artist</td>
|
124
|
-
<td class="context-item-value"> [R] </td>
|
125
|
-
<td class="context-item-desc"></td>
|
126
|
-
</tr>
|
127
|
-
<tr class="top-aligned-row context-row">
|
128
|
-
<td class="context-item-name">format</td>
|
129
|
-
<td class="context-item-value"> [R] </td>
|
130
|
-
<td class="context-item-desc"></td>
|
131
|
-
</tr>
|
132
|
-
<tr class="top-aligned-row context-row">
|
133
|
-
<td class="context-item-name">id</td>
|
134
|
-
<td class="context-item-value"> [R] </td>
|
135
|
-
<td class="context-item-desc"></td>
|
136
|
-
</tr>
|
137
|
-
<tr class="top-aligned-row context-row">
|
138
|
-
<td class="context-item-name">name</td>
|
139
|
-
<td class="context-item-value"> [R] </td>
|
140
|
-
<td class="context-item-desc"></td>
|
141
|
-
</tr>
|
142
|
-
<tr class="top-aligned-row context-row">
|
143
|
-
<td class="context-item-name">persistentid</td>
|
144
|
-
<td class="context-item-value"> [R] </td>
|
145
|
-
<td class="context-item-desc"></td>
|
146
|
-
</tr>
|
147
|
-
<tr class="top-aligned-row context-row">
|
148
|
-
<td class="context-item-name">size</td>
|
149
|
-
<td class="context-item-value"> [R] </td>
|
150
|
-
<td class="context-item-desc"></td>
|
151
|
-
</tr>
|
152
|
-
</table>
|
153
|
-
</div>
|
154
|
-
</div>
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
<!-- if method_list -->
|
159
|
-
<div id="methods">
|
160
|
-
<h3 class="section-bar">Public Class methods</h3>
|
161
|
-
|
162
|
-
<div id="method-M000019" class="method-detail">
|
163
|
-
<a name="M000019"></a>
|
164
|
-
|
165
|
-
<div class="method-heading">
|
166
|
-
<a href="Song.src/M000019.html" target="Code" class="method-signature"
|
167
|
-
onclick="popupCode('Song.src/M000019.html');return false;">
|
168
|
-
<span class="method-name">new</span><span class="method-args">(args)</span>
|
169
|
-
</a>
|
170
|
-
</div>
|
171
|
-
|
172
|
-
<div class="method-description">
|
173
|
-
</div>
|
174
|
-
</div>
|
175
|
-
|
176
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
177
|
-
|
178
|
-
<div id="method-M000020" class="method-detail">
|
179
|
-
<a name="M000020"></a>
|
180
|
-
|
181
|
-
<div class="method-heading">
|
182
|
-
<a href="Song.src/M000020.html" target="Code" class="method-signature"
|
183
|
-
onclick="popupCode('Song.src/M000020.html');return false;">
|
184
|
-
<span class="method-name">get</span><span class="method-args">()</span>
|
185
|
-
</a>
|
186
|
-
</div>
|
187
|
-
|
188
|
-
<div class="method-description">
|
189
|
-
<p>
|
190
|
-
Fetches the song data from the <a href="../DAAP.html">DAAP</a> server and
|
191
|
-
returns it.
|
192
|
-
</p>
|
193
|
-
</div>
|
194
|
-
</div>
|
195
|
-
|
196
|
-
|
197
|
-
</div>
|
198
|
-
|
199
|
-
|
200
|
-
</div>
|
201
|
-
|
202
|
-
|
203
|
-
<div id="validator-badges">
|
204
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
205
|
-
</div>
|
206
|
-
|
207
|
-
</body>
|
208
|
-
</html>
|
@@ -1,27 +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>
|
7
|
-
<head>
|
8
|
-
<title>new (Net::DAAP::Song)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/net/daap/song.rb, line 7</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
|
15
|
-
<span class="ruby-identifier">info</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:song_info</span>]
|
16
|
-
<span class="ruby-ivar">@size</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'daap.songsize'</span>]
|
17
|
-
<span class="ruby-ivar">@album</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'daap.songalbum'</span>]
|
18
|
-
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'dmap.itemname'</span>]
|
19
|
-
<span class="ruby-ivar">@artist</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'daap.songartist'</span>]
|
20
|
-
<span class="ruby-ivar">@format</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'daap.songformat'</span>]
|
21
|
-
<span class="ruby-ivar">@persistentid</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'dmap.persistentid'</span>]
|
22
|
-
<span class="ruby-ivar">@id</span> = <span class="ruby-identifier">info</span>[<span class="ruby-value str">'dmap.itemid'</span>]
|
23
|
-
<span class="ruby-ivar">@daap</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:daap</span>]
|
24
|
-
<span class="ruby-ivar">@db</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:db</span>]
|
25
|
-
<span class="ruby-keyword kw">end</span></pre>
|
26
|
-
</body>
|
27
|
-
</html>
|
@@ -1,19 +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>
|
7
|
-
<head>
|
8
|
-
<title>get (Net::DAAP::Song)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/net/daap/song.rb, line 21</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>
|
15
|
-
<span class="ruby-identifier">filename</span> = <span class="ruby-node">"#{@id}.#{@format}"</span>
|
16
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@daap</span>.<span class="ruby-identifier">get_song</span>(<span class="ruby-node">"databases/#{@db.id}/items/#{filename}"</span>)
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</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/song_rb.html">
|
67
|
-
lib/net/daap/song.rb
|
68
|
-
</a>
|
69
|
-
<br />
|
70
|
-
<a href="../../files/lib/net/daap/playlist_rb.html">
|
71
|
-
lib/net/daap/playlist.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>
|