[Rhythmbox-devel] retreive rythmbox status via shell script.....
- From: matt nicholson <nichols2 fas harvard edu>
- To: rhythmbox-devel gnome org
- Subject: [Rhythmbox-devel] retreive rythmbox status via shell script.....
- Date: Tue, 26 Apr 2005 16:04:24 -0400
hello all. sorry to go straight to the developers mailing list on this
one but it seemed to be the best choice, ehre is my problem/situation:
i am a former xmms zelot. i a month or so ago, crafted this neat little
shell script that would, when the song changed in xmms, from an
info-pipe get the file path, using that to run though a id3 tag reader
on teh file and extract the artist/album/title, scubs those with perl as
needed, then run a python script i wrote to talk to amazon and get the
album art url for the correct album/artist. this all came back to the
scrtip which then generated a little bit of php code in a text file
which was then uploaded to my web server for inclusion on my website, so
the last song i listened to, including a link to stream it and a nice
thumbnail of the album art was displayed.
i have been however, pressing myself to use more and more "gnome" or
"gtk" apps, to keep a nice consistent desktop (xmms doesn't it in to
this, also, my collectionw as gorwing to large to manage via xmms)
rhythmbox, was a natural choice cause i've only had great things to say
about it and didn't move on earlier simply because of habit.
so, today i got around to attempting to convert my script. i notice
rhythmbox has some command line switches, such as --print-playing-path,
which worked perfect forme, although i had to scrub out the file:// and
repalce teh %20 with space, but that was trivial. everything works
perfect, except that i, unless i wanted to write a bonobo (i think...)
component/script/whatever to talk to rhythmbox, would have no way of
knowing when teh song chaged...well, i thought, this is a small script,
not intensive, i can have it write to a lgo file and then check one a
minute to see if teh song has changed and just add it to cron. here i
hit my problem: for the "--print-playing-path" switch to work, it seems
i have to be on a terminal running on the same display as rhythmbox,
because trying to run that switch from an ssh session, as the same user,
yeilds: (rhythmbox:16736): Gtk-WARNING **: cannot open display:
which is odd because that means its attempting to open a display to run
on, even though rhythmbox is running, so...jsut show me the data...
so, this is where i stand now. i have breifly broswed things such as the
rhythmbox-gaim plugin etc to see how they get their data from rthymbox,
however i would liek to avoid writting a program/plugin, and keep this
script based. is tehre a way for me to contact rhythmbox from a diffrent
term/from cron? is there a way to trigger something (a command) when
rhythmbox changes songs?
and advice, help, ideas, question, anything would be great. i've been
wanting to play a more active/contributing role in the community and
hopefully this is a good starting point for me to learn more. oh,
excelent work on rhythmbox.
mat nicholson
sjoeboo sjoeboo com
sjoeboo.com (see the album art thing here if you want to, though, it
won't be current)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]