File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 111
111
# info[], we'll use an 'each' method instead. The 'each' method is
112
112
# similar to Hash#each, except that there's an additional source
113
113
# argument passed to the block.
114
- info . each_pair { |src , key , val | puts "[#{ src } ] #{ key } = #{ val } " }
114
+ info . each_pair { |key , data |
115
+ data . each_pair { |src , val |
116
+ puts "[#{ src } ] #{ key } = #{ val } "
117
+ }
118
+ }
115
119
# Wow, that whole table was printed out with one line of code!
116
120
117
121
# And, of course we check for errors since we want a bulletproof
Original file line number Diff line number Diff line change 54
54
end
55
55
begin
56
56
# Remember, the playlist array is zero-indexed!
57
- puts "#{ index + 1 } . #{ xmms . medialib_get_info ( id ) . wait . value [ :url ] } "
57
+ puts "#{ index + 1 } . #{ xmms . medialib_get_info ( id ) . wait . value . to_propdict [ :url ] } "
58
58
# It's possible that the URL isn't defined by the server, like if
59
59
# you added a non-media file to the playlist. You should keep that
60
60
# in mind when writing a client, but in this case PropDict#[:url]
You can’t perform that action at this time.
0 commit comments