maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   "Now Playing" app (https://talk.maemo.org/showthread.php?t=45931)

qwerty12 2010-02-27 18:11

Re: "Now Playing" app
 
Quote:

Originally Posted by tuminoid (Post 549057)
I'm working on a package for this and hoping I can find spare time to put a package to -devel today/tomorrow/monday at latest. Let me know Faheem if you're working on your code still, I'd hate to waste my/your time to do same thing over again.

I'm not working on it. It's code from something of mine that never saw the light of day, the code itself being butchered from the Last.fm Scrobbler (GPL V.2 licensed) and some code I wrote for Transmission to display the notifications. So I thought I may as well put it up in the hope that somebody can fix it up.

Hopefully, you'll get the time to fix the number of problems with it (if you've compiled it, I'm sure you will know what I mean...). :)

tuminoid 2010-02-28 06:22

Re: "Now Playing" app
 
I put a project application in to Garage admins as well, so this thing is taking baby steps forward :) See the sig: behold the nowplayingd (yeah, I suck at inventing project names... :P)

mottis 2010-02-28 06:58

Re: "Now Playing" app
 
Quote:

Originally Posted by tuminoid (Post 549607)
I put a project application in to Garage admins as well, so this thing is taking baby steps forward :) See the sig: behold the nowplayingd (yeah, I suck at inventing project names... :P)

No I think it's catchy and understandable. I would've put something like "what the hell is that song?! -app"

tuminoid 2010-02-28 07:13

Re: "Now Playing" app
 
Quote:

Originally Posted by mottis (Post 549616)
No I think it's catchy and understandable. I would've put something like "what the hell is that song?! -app"

Thats just a nerd-engineer project name - apps friendly name is yet to be determined and your suggestion sounds much groovier than mine B-)

gazza_d 2010-02-28 08:21

Re: "Now Playing" app
 
Quote:

Originally Posted by qwerty12 (Post 548637)
Something like this? http://imgur.com/PXWft.png

Code is here: http://slexy.org/view/s2FoAoHW5M

(gcc mafw.c `pkg-config --cflags --libs hildon-notify glib-2.0 mafw mafw-shared` -Wall)

Because there are so many things wrong with it, I won't insult people by uploading a binary. I up'ed the shitty code in hope that someone who actually knows what they're doing can improve it and fix its problems.

On the plus side, it does show the name and artist of the song if it is properly tagged and pressing the notification does bring up the media player. Those are probably the only good points...

I'd probably like to see this, too, but for a more nostalgic reason: My W810i used to do this. :)

How did you do this on an N810 then? Please do tell< as this sounds like a useful and fun little trick.

qwerty12 2010-02-28 08:30

Re: "Now Playing" app
 
Quote:

Originally Posted by gazza_d (Post 549636)
How did you do this on an N810 then? Please do tell< as this sounds like a useful and fun little trick.

I still have my N800 around, so I'll see if I can find any ways to get the currently playing song name. The notifications would be of the "recieved a new IM" type.

But MAFW's predecessor - osso-media-server - is much, much less documented and extensible compared to MAFW so I can't promise anything.

gazza_d 2010-02-28 08:36

Re: "Now Playing" app
 
Quote:

Originally Posted by qwerty12 (Post 549640)
I still have my N800 around, so I'll see if I can find any ways to get the currently playing song name. The notifications would be of the "recieved a new IM" type.

But MAFW's predecessor - osso-media-server, is much, much less documented and extensible compared to MAFW so I can't promise anything.

Actually, just re-read the posts, and initially mis-read W810i as meaning the 810 wimax! Oops and sorry, mind you if this is doable, it'd be great.

qwerty12 2010-02-28 13:02

Re: "Now Playing" app
 
Quote:

Originally Posted by gazza_d (Post 549643)
Actually, just re-read the posts, and initially mis-read W810i as meaning the 810 wimax! Oops and sorry, mind you if this is doable, it'd be great.

http://imgur.com/CllW3.jpg

Still needs packaging, however; will upload to extras-devel when done.

Some notes:
  • Only works with songs that are tagged.
  • Due to the way Diablo handles notifications, you have to press the home key to see them. I'll add an option (by way of editing its init.d script) that lets you use HildonBanner instead (bubbles in the right with a blue 'i').

(Though I take back what I said about OMS - I just used DBus-GLib for this. Much nicer than bloody MAFW.)

gazza_d 2010-02-28 13:38

Re: "Now Playing" app
 
Quote:

Originally Posted by qwerty12 (Post 549824)
http://imgur.com/CllW3.jpg

Still needs packaging, however; will upload to extras-devel when done.

Some notes:
  • Only works with songs that are tagged.
  • Due to the way Diablo handles notifications, you have to press the home key to see them. I'll add an option (by way of editing its init.d script) that lets you use HildonBanner instead (bubbles in the right with a blue 'i').

(Though I take back what I said about OMS - I just used DBus-GLib for this. Much nicer than bloody MAFW.)

Blooming magic - Top Man!

qwerty12 2010-02-28 19:18

Re: "Now Playing" app
 
Quote:

Originally Posted by qwerty12 (Post 549824)
Still needs packaging, however; will upload to extras-devel when done.

Now Playing Notifier 0.1 is in Diablo extras-devel.

I imagine tuminoid is working on the Fremantle version. :)

By default, notifications hide after 10 seconds, they hide when the track is stopped and, of course, they hide when the track is changed.

By default, it uses this type of notification:
http://imgur.com/151O7.png

But it can be configured to use a HildonBanner, instead:
http://imgur.com/ZvbRt.png

If you wish to change the timeout and the type of notification:
Edit the file /etc/default/now-playing-notifier and change NPN_OPTIONS as required.
E.g., to make it use a HildonBanner with a timeout of 20 seconds: NPN_OPTIONS="-u -t 20"

When using the IM-type notifications, a timeout of '0' means it will stay on the screen forever (until destroyed upon the changing/stopping of the track).

Oh, and it only works on tracks with artist and title tags. If someone knows a way to get the filename of the currently playing track from the Media Player, let me know. :)


All times are GMT. The time now is 04:56.

vBulletin® Version 3.8.8