maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   [Announce] mafw-trackinfo: dbus interface to song metadata (https://talk.maemo.org/showthread.php?t=72396)

GreatGonzo 2011-04-21 12:15

[Announce] mafw-trackinfo: dbus interface to song metadata
 
Ok. I have finally done what I promised. I have uploaded this to extra-devel.

Description:
A dbus wrapper (event.d "daemon) around song metadata.
The metadata for the currently playing song in MAFW is spread through
several interfaces and signals. It is also lacking album art. This "daemon" processes these and presents a more sensible interface.

The main benefit of this will be quick-widgets and queen beecons. I can now have a player widget for the built-in media player and/or the OMP.

It should have minimal effect on battery usage an uses about 5MB of memory.

The methods are

Code:

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetArtistAlbumTitleArt

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetArtist

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetAlbum

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetTitle

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetArt

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetKeys

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetTrackNo

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetDuration


# get the above but by key name as is appears in the renderer
# metadata. This will return variants
dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetByKey string:<key>

Thanks go to the author of mussorgsky for the album art access in python.

Source:

https://bitbucket.org/mmarquar/mafw-trackinfo

hawaii 2011-04-21 12:29

Re: [Announce] mafw-trackinfo: dbus interface to song metadata
 
Hot.

Thanks for working on this.

GreatGonzo 2011-04-21 12:36

Re: [Announce] mafw-trackinfo: dbus interface to song metadata
 
Actually I forgot one goody.

Code:

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetArt string:<album-name>
This will give the album art of the specified album independent of mediaplayer running.

GreatGonzo 2011-04-22 04:40

Re: [Announce] mafw-trackinfo: dbus interface to song metadata
 
BTW, if anybody wants any other related metadata exposed let me know.

vi_ 2011-07-21 10:31

Re: [Announce] mafw-trackinfo: dbus interface to song metadata
 
Good show, however 5MB is massively heavy just to get the track name.

What is the dbus call that returns the track name/artist in case I just wanted to sed/awk/grep my way to victory?

zurrain101 2011-07-21 15:30

Re: [Announce] mafw-trackinfo: dbus interface to song metadata
 
hey i cant find this in extras-devel

bigears5000 2011-08-26 23:08

Re: [Announce] mafw-trackinfo: dbus interface to song metadata
 
Hi GreatGonzo. I have a question for you (or anyone else). I am using this command
dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetArt string:<album-name>

in queen beecon widget, and I have the result, but it shows the underlying information, rather than the actual art. For example

method return sender=1.65- dest=1.305reply_serial=2string"/home/user/.cache/media-art/album-725ee9 etc etc etc ......jpeg"

Also, with the other commands listed in this thread, I get the result, but it also shows all the string information as well, rather than just the track name for example. Any ideas. How can I single out the part of the result I want. Am I missing something or is this how the results are intended to be shown? Thanks for any help.

Harick 2011-08-30 02:10

Re: [Announce] mafw-trackinfo: dbus interface to song metadata
 
Quote:

Originally Posted by bigears5000 (Post 1077232)
Hi GreatGonzo. I have a question for you (or anyone else). I am using this command
dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetArt string:<album-name>

in queen beecon widget, and I have the result, but it shows the underlying information, rather than the actual art. For example

method return sender=1.65- dest=1.305reply_serial=2string"/home/user/.cache/media-art/album-725ee9 etc etc etc ......jpeg"

Also, with the other commands listed in this thread, I get the result, but it also shows all the string information as well, rather than just the track name for example. Any ideas. How can I single out the part of the result I want. Am I missing something or is this how the results are intended to be shown? Thanks for any help.

i notice this too, to get the info for QBW you have to parse the result, i made an example some time ago, i think its in the "show off your desktop" epic thread

anyway, you don't want to search trough 400 pages so, here is how i did it.


AlbumArt
Code:

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetArt | awk '{ FS="\\""} {print $2}' | tail -1
Title
Code:

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetTitle | awk 'BEGIN{FS="\\""} {print $2}' | tail -1
Artist
Code:

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetArtist | awk 'BEGIN{ FS="\\""} {print $2}' | tail -1
Album
Code:

dbus-send --print-reply --dest=com.marquarding.trackinfo / com.marquarding.trackinfo.GetAlbum | awk 'BEGIN{ FS="\\""} {print $2}' | tail -1

if you want the example, here is it

i don't know if it's the best way, maybe there is another, but this one works for me

sixwheeledbeast 2012-05-06 15:37

Re: [Announce] mafw-trackinfo: dbus interface to song metadata
 
Quote:

Originally Posted by zurrain101 (Post 1055533)
hey i cant find this in extras-devel

There is a package instance on maemo.org but it's not in the repo's.
Is there a reason for this?

Sandeep 2012-05-18 10:50

Re: [Announce] mafw-trackinfo: dbus interface to song metadata
 
Is there a way to toggle the pause/resume command on a single QBW ??


"I found it. Thanks "


All times are GMT. The time now is 20:22.

vBulletin® Version 3.8.8