Registered Member
|
Hi!
Old version of Amarok use DCOP and dcop amarok player path give a path to file now played how I can get it for Amarok 2 with d-bus Sorry for my english
Last edited by knicefire on Fri Sep 19, 2008 11:56 am, edited 1 time in total.
|
KDE Developer
|
--
Mark Kretschmann - Amarok Developer |
Registered Member
|
Thanks for answer but I can't get it.
I can't find any function for use in my script. Mabe imposible use one line command to get path to file now played. Can you help me please? |
Registered Member
|
...yeah its late. but there will be other guys (like me) who will spend some hours to figure this out. |
Registered Member
|
Thanks, but I no get solution on your answer.
|
KDE Developer
|
--
Mark Kretschmann - Amarok Developer |
Registered Member
|
Thank you all,
But I'm not programer. I no need learn some programing language to get some simple do. XMMS2 - it's better solution for me. P.S. I need one string solution for simpe script on bash. |
Registered Member
|
In bash qdbus org.mpris.amarok /Player org.freedesktop.MediaPlayer.GetMetadata will give you informations on the track playing including the location
|
KDE Developer
|
Admittedly MPRIS is a pretty bare API.
Amarok Developer
|
Registered Member
|
As far as I'm concerned I think it should be a good idea to provide a method that return the location in a format that could be used directly in bash without having to convert filenames by replacing special chars (like %20 for a space, etc).
I mean if i want to retrieve filename for track at position "$i" in the Tracklist I have to do :
It's a little bit long for a filename |
Registered Member
|
Yes, this problem was in Amarok 1, until a non-urlencoded path was added to the dcop calls. So it would be nice if a 'qdbus org.kde.amarok /TrackList GetCurrentPath' call could be added, which would return a non-urlencoded path. Grepping for 'location:' doesn't seem like a good solution
|
KDE Developer
|
Sounds like a sane idea to me. We should probably add it then (hopefully we won't forget).
--
Mark Kretschmann - Amarok Developer |
KDE Developer
|
Maybe we could just bundle a mpris CLI client for people who want to do some basic stuff in bash. MPRIS is pretty bare if you use qdbus, but really it has all the information that you'd need for playlist and player operations.
Amarok Developer
|
Registered Member
|
Thank you!!! It works!! |
Registered users: bancha, Bing [Bot], daret, Evergrowing, Google [Bot], lockheed, sandyvee, Sogou [Bot]