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)

gazza_d 2010-02-28 19:35

Re: "Now Playing" app
 
Quote:

Originally Posted by qwerty12 (Post 550132)
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. :)

Installed, configured and tested = Class. Thanks very muchly. That is a really cool great little utility.

tuminoid 2010-03-01 10:52

Re: "Now Playing" app
 
Quote:

Originally Posted by qwerty12 (Post 550132)
I imagine tuminoid is working on the Fremantle version. :)

Yup, Garage project got approved, see my sig.

I'm pushing a dead-simple version to devel tonight, basically Faheems version with some tiny fixes, xsession init and package wrapping around it to get comments from brave testers, then start really fixing and improving it.

I'll post again when package is in -devel.

tuminoid 2010-03-01 12:45

Re: "Now Playing" app
 
Quote:

Originally Posted by tuminoid (Post 550825)
I'll post again when package is in -devel.

nowplayingd 0.1-2 is now available from extras-devel.

Screenshot: http://tumi.kuvat.fi/kuvat/public/ma...0.1-2.png/full

My TODO includes:
* better handling of notifications (cough, do videos need notifications too?), including stop/start
* add support for showing filenames or best guess if artist/title id3 tags aren't available
* allow configuration of banner visibility
* allow configuration of default click action - stop, next track, open mediaplayer being obvious choises
* allow using hildonbanner instead
* add configuration applet for mentioned options
* some basic battery saving features
* use proper makefiles and rules instead of hacks
* fixing code so it doesnt leak or complain
* do it all in Qt

Suggestions and feedback welcome! I don't spit on patches either :-)

qwerty12 2010-03-01 15:58

Re: "Now Playing" app
 
Quote:

Originally Posted by tuminoid (Post 550941)
* better handling of notifications (cough, do videos need notifications too?), including stop/start

Personally, and this is just me, I don't need notifications when I stop a track. For videos, I'd say there's no point: When playing a video, you can't see notifications anyway (they go into the background) due to the DnD Atom being set.

Quote:

Originally Posted by tuminoid (Post 550941)
* add support for showing filenames or best guess if artist/title id3 tags aren't available

Definitely! I'm hoping that it's a matter of just finding the right metadata key.

Quote:

Originally Posted by tuminoid (Post 550941)
* allow configuration of banner visibility

Agreed. Customisable timeouts and having it destroyed when the track is stopped is what I did for Now Playing Notifier.

(BTW: Why g_timeout_add_seconds () instead of notify_notification_set_timeout () ? :))

Quote:

Originally Posted by tuminoid (Post 550941)
* allow configuration of default click action - stop, next track, open mediaplayer being obvious choises

Opening the Media Player is already handled in that sample code; a dbus-send line for pausing is here: http://talk.maemo.org/showpost.php?p...9&postcount=38 - replace "pause" with "stop/next".

Quote:

Originally Posted by tuminoid (Post 550941)
* allow using hildonbanner instead

Yes: HildonBanner is actually what I prefer for these sort of notifications.

Quote:

Originally Posted by tuminoid (Post 550941)
* add configuration applet for mentioned options

Yes, preferably in the Control Panel.

Quote:

Originally Posted by tuminoid (Post 550941)
* some basic battery saving features

Yes, I don't think notifications do anybody any good when the display is off =)

Quote:

Originally Posted by tuminoid (Post 550941)
* use proper makefiles and rules instead of hacks

I like Autotools. :)

Quote:

Originally Posted by tuminoid (Post 550941)
* fixing code so it doesnt leak or complain

What?! OK... It shouldn't leak, but I do see it complaining. :\
Though, here's one thing that I neglected to do: notify_uninit () on exit.

Quote:

Originally Posted by tuminoid (Post 550941)
* do it all in Qt

*cries* Come on, man. MAFW and the notification APIs are all GObject-based, anyway, so is there any point to using Qt (if you hadn't already guessed, I'm anti-Qt and pro-Gtk+)?

Anyway, since I've already done some of these for Now Playing Notifier, I'll try and send some patches your way.

mottis 2010-03-01 16:27

Re: "Now Playing" app
 
I agree that notification about stopping a song isn't really useful..
And videoplayer doesn't need a notification because, well, you don't have time to glance at notifications when you enjoy your video (in my opinion).

Could it be possible to get that notification box to open from, let's say the camera key? That way if you were too distracted by maemo.org when that song started you could check again what it was..

Anywho, amazing how fast you made that thing. You just made my day. :)

qwerty12 2010-03-01 17:03

Re: "Now Playing" app
 
Now I'm just wondering if you're trying to piss me off. :)

But, anyway, tuminoid, would you mind me requesting to join since I'm actually contributing instead of just whining (*cough*)? At the very least, it'd give me a better place to discuss this instead of this ****ty thread. I've figured out how to get the filenames using MafwPlaylist if it helps and would like to contribute a patch:
Quote:

1 - FmpAudioPlaylist
localtagfs::music/songs/%2Fhome%2Fuser%2FMyDocs%2F.sounds%2FLil%20Wayne%20-%20We%20Fly%20High%20Remix%20%28New%20Orleans%29.m p3
Obviously, the filename needs to be cleaned up but GLib has functions for that IIRC.

generationally 2010-03-01 17:33

Re: "Now Playing" app
 
Thanks guys!

Just installed it and it works nicely so far!

My request would be that instead of showing some media player icon together with the artist and song, it would show the actual album art if available. Doable?

Edit: This is how it looks for me if anyone is interested ;)

http://farm5.static.flickr.com/4030/...8d1acbf1_o.png

zerojay 2010-03-01 18:56

Re: "Now Playing" app
 
I love it, guys. Great idea... now if only we can get the song from MAFW used as my status message on IM... :)

tuminoid 2010-03-01 19:35

Re: "Now Playing" app
 
Quote:

Originally Posted by qwerty12 (Post 551138)
Personally, and this is just me, I don't need notifications when I stop a track. For videos, I'd say there's no point: When playing a video, you can't see notifications anyway (they go into the background) due to the DnD Atom being set.

Heh, I meant cleaning them up. Videos are producing notifications even they're not shown (except if you quickly ctrl-backspace while notification is shown), but I'd still like to fix it. Same for stopping/pausing/whatever, the point is to get rid of them where inappropriate.


Quote:

Originally Posted by qwerty12 (Post 551138)
Definitely! I'm hoping that it's a matter of just finding the right metadata key.

Quote:

Originally Posted by qwerty12 (Post 551240)
But, anyway, tuminoid, would you mind me requesting to join since I'm actually contributing instead of just whining (*cough*)? At the very least, it'd give me a better place to discuss this instead of this ****ty thread. I've figured out how to get the filenames using MafwPlaylist if it helps and would like to contribute a patch:

Of course I don't mind, it'd be nice to have someone to collaborate with in some projects.

Quote:

Originally Posted by qwerty12 (Post 551240)
Now I'm just wondering if you're trying to piss me off. :)

Hehe, not trying to piss you off :) As said in 0.1-1 changelog, this 0.1 release is simply about producing/packaging a prototype, THEN recode/refactor the code. (I'm assuming you mean I used rather exact copy of your sample code?)


Quote:

Originally Posted by qwerty12 (Post 551138)
Agreed. Customisable timeouts and having it destroyed when the track is stopped is what I did for Now Playing Notifier.

(BTW: Why g_timeout_add_seconds () instead of notify_notification_set_timeout () ? :))

Just a quick hack :/

I noticed your post about Diablo version, seems that you and me think alike.


Quote:

Originally Posted by qwerty12 (Post 551138)
Opening the Media Player is already handled in that sample code; a dbus-send line for pausing is here: http://talk.maemo.org/showpost.php?p...9&postcount=38 - replace "pause" with "stop/next".

Yup, I was just writing down the options I'm gonna implement. Thanks for the link.


Quote:

Originally Posted by qwerty12 (Post 551138)
Yes: HildonBanner is actually what I prefer for these sort of notifications.

I somehow like the notify notifications better myself, so thats why there is gonna be an option.


Quote:

Originally Posted by qwerty12 (Post 551138)
Yes, preferably in the Control Panel.

Yup, where else? Config applets as apps are shitty idea.


Quote:

Originally Posted by qwerty12 (Post 551138)
Yes, I don't think notifications do anybody any good when the display is off =)

Exactly. I'm just thinking that just simply removing the notification probably isn't making much difference, as hildon-desktop probably ignores notifications when display is off anyways. But perhaps we could unsubscribe from MAFW when display goes off or something to totally prevent waking up.


Quote:

Originally Posted by qwerty12 (Post 551138)
I like Autotools. :)

Me too, IF the project is worth it.


Quote:

Originally Posted by qwerty12 (Post 551138)
What?! OK... It shouldn't leak, but I do see it complaining. :\
Though, here's one thing that I neglected to do: notify_uninit () on exit.

I checked it and it doesn't leak while operating, but cleanup isn't clean (not that it really matters, we are exiting only on shutdown...)


Quote:

Originally Posted by qwerty12 (Post 551138)
*cries* Come on, man. MAFW and the notification APIs are all GObject-based, anyway, so is there any point to using Qt (if you hadn't already guessed, I'm anti-Qt and pro-Gtk+)?

Nooooo, I didn't notice?! :-D

I'm not gonna shove Qt where it doesn't belong, but perhaps the config app could be written with Qt, in hopes of porting it to MeeGo easily (though I see so many obstacles in the way it might not be worth it, or app might not even be necessary then anymore)

Quote:

Originally Posted by qwerty12 (Post 551138)
Anyway, since I've already done some of these for Now Playing Notifier, I'll try and send some patches your way.

Thanks man. Send the maintainer request and I'll add you.

tuminoid 2010-03-01 19:35

Re: "Now Playing" app
 
Quote:

Originally Posted by generationally (Post 551293)
My request would be that instead of showing some media player icon together with the artist and song, it would show the actual album art if available. Doable?

Thanks for an idea, it should be doable. I'll add it to the TODO list.


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

vBulletin® Version 3.8.8