Notices


Reply
Thread Tools
GreatGonzo's Avatar
Posts: 275 | Thanked: 389 times | Joined on Feb 2010 @ Sydney
#1
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
__________________
Quick Widgets - http://wiki.maemo.org/Quick_Widgets

Last edited by GreatGonzo; 04-22-2011 at 01:37 AM.
 

The Following 17 Users Say Thank You to GreatGonzo For This Useful Post:
hawaii's Avatar
Posts: 1,020 | Thanked: 772 times | Joined on Jun 2009 @ Toronto
#2
Hot.

Thanks for working on this.
__________________
Blog: Know Nokia
 
GreatGonzo's Avatar
Posts: 275 | Thanked: 389 times | Joined on Feb 2010 @ Sydney
#3
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.
__________________
Quick Widgets - http://wiki.maemo.org/Quick_Widgets
 

The Following 5 Users Say Thank You to GreatGonzo For This Useful Post:
GreatGonzo's Avatar
Posts: 275 | Thanked: 389 times | Joined on Feb 2010 @ Sydney
#4
BTW, if anybody wants any other related metadata exposed let me know.
__________________
Quick Widgets - http://wiki.maemo.org/Quick_Widgets
 

The Following User Says Thank You to GreatGonzo For This Useful Post:
Posts: 1,678 | Thanked: 3,662 times | Joined on Jan 2011
#5
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?
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 
Posts: 536 | Thanked: 81 times | Joined on May 2011 @ Russia
#6
hey i cant find this in extras-devel
 
bigears5000's Avatar
Posts: 468 | Thanked: 773 times | Joined on May 2010 @ Hereford, England
#7
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's Avatar
Posts: 140 | Thanked: 368 times | Joined on Jun 2010 @ Ituzaingo, Argentina
#8
Originally Posted by bigears5000 View Post
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

Last edited by Harick; 08-29-2011 at 10:19 PM.
 

The Following User Says Thank You to Harick For This Useful Post:
Posts: 1,995 | Thanked: 3,295 times | Joined on Apr 2010 @ St. Helens, England
#9
Originally Posted by zurrain101 View Post
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?
__________________
The stable-beast currently runs...
21.2011.38-1Smaemo6.1 (CSSU Stable)
2.6.28.10power52 (125-600Mhz SR VDD1&2)

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 
Sandeep's Avatar
Posts: 105 | Thanked: 49 times | Joined on Nov 2010 @ Bangalore
#10
Is there a way to toggle the pause/resume command on a single QBW ??


"I found it. Thanks "

Last edited by Sandeep; 05-20-2012 at 03:31 AM.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT -4. The time now is 03:15 PM.