[PATCH] DCOP call QMap<Qstring, QString> DcopPlayerHandler::id3info()

Arash Abedinzadeh arash at netcologne.de
Tue Aug 8 13:22:55 UTC 2006


Hi there,

I wrote a DCOP call that returns a list of all ID3 infos (and more) about
the current song. Calls like title, artist, album, etc. exist, but I think
a single call could be more handy if one really needed all information. The
output of "dcop amarok player id3info" is fairly easy to process/parse with
scripts. In Ruby e.g.:

h = Hash.new
IO.popen("dcop amarok player id3info").read.split("\n").each do |x|
   k, v = x.split("->", 2)
   h[k] = v
end

puts "%s - %s - %s - %s" % [
   h["Artist"],
   h["Album"],
   h["Track"],
   h["Title"]
]

So ... what do you think?

--
Arash
        
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amarok.dcop.id3info.patch
Type: text/x-diff
Size: 2575 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/amarok/attachments/20060808/8a4e9a50/attachment.bin>


More information about the Amarok mailing list