upnp_content_explorer 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/upnp_content_explorer/item.rb +10 -2
- data/lib/upnp_content_explorer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b861a3fe0ebc3250d1355680f840f220df824688
|
4
|
+
data.tar.gz: caee9fb011bdbd4063ee10da8b9ff0041566e6f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9a781021b75ff7cdc2c426d52238e652a08ce82344190595fb923d70acc7d435121eab2ed22159518be63894b87f556607777f9abb2865d9ee08e33a70f76bd
|
7
|
+
data.tar.gz: a03ab87e02bb59cefec088186dcbf4e24319fc26b4e2ae5486b6eb0fbe9ffa416c49e1e63b19c994e4eca8bc4889f09b30d52369160f2dd0c586b62abc74203c
|
@@ -12,14 +12,22 @@ module UpnpContentExplorer
|
|
12
12
|
define_singleton_method(m) { extract_xpath("#{m}") }
|
13
13
|
end
|
14
14
|
|
15
|
+
@metadata = {}
|
15
16
|
%w{
|
16
17
|
size duration bitrate sampleFrequency nrAudioChannels resolution
|
17
18
|
protocolInfo
|
18
19
|
}.each do |m|
|
19
|
-
|
20
|
+
v = extract_xpath("res/@#{m}")
|
21
|
+
@metadata[m.to_sym] = v
|
22
|
+
define_singleton_method(m) { v }
|
20
23
|
end
|
21
24
|
|
22
|
-
|
25
|
+
@metadata[:url] = extract_xpath('res')
|
26
|
+
define_singleton_method('url') { @metadata[:url] }
|
27
|
+
end
|
28
|
+
|
29
|
+
def metadata
|
30
|
+
{}.merge(@metadata)
|
23
31
|
end
|
24
32
|
|
25
33
|
private
|