full listings » Appearance, Playback


ubuntu-notifier Niels

Displays various notafications trough the ubuntu notafication system.


ubuntu-notifier



Description

Warning: this addon only works if you have python-notify and python-dbus installed. If you run Ubuntu Karmic, both are already installed.

On Ubuntu Hardy, Intrepid and Jaunty you can install these packages with:
sudo apt-get install python-notify python-dbus

The Ubuntu-notifier displays various notifications through the ubuntu notification system. At the moment it notifies you what song is playing at the start of every song.

Also I want to thank Conlan for some of the code I could grab from his Song notifier




Release Notes

Changelog:

  • Hurray! It now updates the bubble when you skip a song!

Things still to do:

  • Create a preference page
  • Show a notification when a download is complete
  • Re-add album art support
  • No notifications are displayed when in mini-mode



Images

(1)
  • Schermafdruk_thumbnail
 

Comments

(47)


boosh
boosh

Thanks Niels!! Love it!

6 months ago
RPG_Master
RPG_Master

:(

It doesn't fix the issue were when you skip several tracks it lags behind and notifies you of each track....

6 months ago
chaos-black
chaos-black

I'm so glad that there is finally a way to get the notification ubuntu style :) :) THANK YOU!!!
Perhaps you can help me with the issue, that pidgin doesn't notify me that way anymore, since i accidently copy/pasted a wrong .purple folder :-/
But congrats to this 5star addon :)

6 months ago
Niels
Niels

@RPG_Master
Added to my todo-list.

@chaos-black
I'm very happy that you find my plugin usefull. I don't know about your problem, but is probably a plugin you should enable. Or you can try to backup your .purple folder and remove it, it should be replaced with the default version as you start pidgin.

6 months ago
ACMiller
ACMiller

Great work Niels, this is brilliant.
One Problem though, and it may just be me, but the album art is pretty poor quality (looks as though it's been resized too small and then stretched again). Oh, and the description of the Addon should read: "Displays various notifications through the ubuntu notification system", but that's just me being overly meticulous!
Thanks alot

6 months ago
Niels
Niels

@ACMiller
Thanks for your reply! After some googling it is a problem more applications have (pidgin, rythmbox, banshee, etc). Example: https://bugs.launchpad.net/notify-osd/+bug/360228

Currently I'm using the command "notify-send" to display the notification, but probably the best way is to add a very simple C program that talks directly to notify-osd. This removes the dependency on libnotify-bin and gives me more control on how the notifications are being displayed. I don't have some (but not much) knowledge about C so it could take a while.

6 months ago
ACMiller
ACMiller

You're right, it does look like a bigger problem. Well thanks for being willing to try find a work around. Good luck!

6 months ago
Slate8
Slate8

This is great - fantastic add-on and works really well. Thanks!

6 months ago
bpercheron
bpercheron

Great great great..! 5 stars..!!

6 months ago
six-geek
six-geek

Hej Niels,
this add-on is a great idea. But I have a problem with it. Is it possible, that this add-on is not compatible with Songbird 1.1.1, Build 1018 (20090314003734)? My Songbird told my at the manually installation that: "ubuntu-notifier 0.1.0.0 could not be installed because it is not compatible with Songbird 1.1.1."

A fix would be great as well.
Tack and thanks.

6 months ago
siga
siga

Your addon is amazing ! Here is a screen shot of your work :
[URL=http://img39.imageshack.us/i/screenshotpus.png/][IMG]http://img39.imageshack.us/img39/7886/screenshotpus.png[/IMG][/URL]

Thank you!

Btw , if anyone is interested Songbird is running in Jaunty and it is awesome !

6 months ago
LIB53
LIB53

Works alright. You seem to have noticed everything that i've noticed so just keep up the good work.

6 months ago
Niels
Niels

@six-geek:
will fix that tommorow

@the-rest:
I'm still trying to find how I can fix the bugs :)

5 months ago
Sloshy
Sloshy

with this addon enabled as well as now playing list, when a song next in the "now playing list" is played it starts playing then immediately stops for 1-2 seconds before playing again. anyone else have this problem?

5 months ago
Sloshy
Sloshy

nevermind, its probably not this addon

5 months ago
foolishgrunt
foolishgrunt

Add-on works great for me, but I'm just wondering if anyone knows how to turn off the default songbird notifications. Kind of redundant otherwise.

5 months ago
Niels
Niels

@foolishgrunt:
Default notifications? Maybe you have the Song-notifier (http://addons.songbirdnest.com/addon/39) plugin installed?

5 months ago
FokkerCharlie
FokkerCharlie

Works only sporadically for me. Sometimes I see the notification, more often than not, I don't. Using Ubuntu Jaunty 64. Is there any output or logs that I can send in for debugging?

Charlie

5 months ago
foolishgrunt
foolishgrunt

@Niels:
No I don't. As far as I can tell, these notifications came standard with the player. I didn't install anything to get them. But maybe my system is just crazy.

5 months ago
Niels
Niels

@FokkerCharlie:
Can you check if you have installed the latest version? Maybe removing it and then reinstalling it from this site.

@foolishgrunt:
With the Songbird Beta 1 I don't have any popups as default :/.

5 months ago
foolishgrunt
foolishgrunt

I'm using version 1.2, build 1146. This is what I'm getting:

http://smg.photobucket.com/albums/v490/foolishgrunt/?action=view&current=Screenshot.png

Is anybody else getting this, or is my system crazy?

5 months ago
foolishgrunt
foolishgrunt

Sorry, I meant:
http://img.photobucket.com/albums/v490/foolishgrunt/Screenshot.png

5 months ago
FokkerCharlie
FokkerCharlie

Hi Neils

Version 1.1.1 here, uninstalled and reinstalled as instructed, still works only rarely! I'm running the Linus 64-bit version, btw... maybe that's why noone else has reported this isue!

Charlie

5 months ago
Niels
Niels

@foolishgrunt:
No idea where that thing comes from :-P.

@FokkerCharlie
I'm using 64-bit Karmic, so that should not matter, I'm only using javascript and python. Do you have the problem with songs with certain characters? Is the problem there with the same songs, or does it happen at random? Does it only happens when you skip a track, or also when it skips to the next track at the end of the song?

Could you download this file (http://inoue.nl/download_complete_notify.py), make it excecutable and run it with "./download_complete_notify.py something somethingelse" and verify that every time a popup shows?

Thanks for your feedback :-).

5 months ago
FokkerCharlie
FokkerCharlie

Hi Niels

It seems that, at the moment, the notifier works the for the first track after making a selection- that is to say if I double-click an album or track, from either Media Flow or the main listing, I get a notification. Then it stops appearing. It doesn't seem to matter whether I skip a track or not. The python code that you linked seems to work every time. I don't see that it's anything to do with special characters, I've tried with albums that have no special chars.

Hmmmmm!

Thanks for paying attention to this!

Charlie

5 months ago
Spike1506
Spike1506

Great addon, to bad it doesn't show album art anymore..

4 months ago
ojii
ojii

Same problem as Spike1506, and without artwork it looks a bit poor...

4 months ago
foolishgrunt
foolishgrunt

I figured out where the "default" notifications were coming from: the Birdtitle addon. Sorry for being confusing.

Also, I'm not getting album art anymore here either.

4 months ago
Cornwall
Cornwall

Great addon. I'm hoping that changing tracks quickly could be reflected dynamically in Notify-OSD soon. :)

4 months ago
FokkerCharlie
FokkerCharlie

I've realised something- I am only missing the notifications when the player is in mini-mode (which it usually is here!). Is it possible to get the addon working with this mode?

Also missing the artwork btw.

Cheers
Charlie

3 months ago
Niels
Niels

@Cornwall:
I'm working on it atm.

@FokkerCharlie:
I never use the mini-mode, but thanks for the bug. I'll go look into it after the dynamic-osd feature.

@Everyone else:
I'm going to work again on the artwork when the dynamic-osd are working, I'm still not sure how I'm going to implent the artwork.

3 months ago
Niels
Niels

Songbird-notifier now updates the notify when you skip a song. The codebase is now like 2 times greater so bugs are to be expected.

Also it depends on python-dbus now, but that should not be a problem because I think its installed as default in any modern linux-distrobution.

3 months ago
robin0800
robin0800

Not sure if any of this helps this is the python code for the osd script for Amarok

---------------------------------------------------------------------------------------------------------------------------------------
#!/usr/bin/python

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; see GNU General Public License for more details.

# See <http: /> for GNU General Public License contents.
 
import sys
import pynotify
import os
import re
import time

n=False;
lastcall = 0;

def bubble(title, content, icon): #function at first call creating, and at each other call updating osd bubble
global n, lastcall

if not n:
n = pynotify.Notification(title, content, icon); #if not existent create...
n.show();
elif(time.time() > lastcall+10):
n.close();
n = pynotify.Notification(title, content, icon); #if not existent create...
n.show();
else:
n.update(title, content, icon); # ... or, otherwise, update a bubble
n.show();

lastcall = time.time()

if __name__ == '__main__':
if not pynotify.init("Amarok-osd"): #check if pynotify works
sys.exit(1)

while 1:

try:
i = raw_input(); #Amarok communicates with scripts via stdin
except (KeyboardInterrupt, SystemExit):
if n:
n.close();
sys.exit(1);

if i == "engineStateChange: paused":
o = os.popen("dcop amarok player coverImage");
bubble("Amarok", "Playback paused", o.read().rstrip())
o.close();
continue;
if i == "engineStateChange: empty":
o = os.popen("dcop amarok player coverImage");
bubble("Amarok", "Playback stopped", o.read().rstrip())
o.close();
continue;
if i == "trackChange" or i == "engineStateChange: playing":

o = os.popen("dcop amarok player artist");
s = o.read().rstrip() + " - "

o = os.popen("dcop amarok player album");
s += o.read().rstrip() + "\n"

o = os.popen("dcop amarok player track");
s += o.read().rstrip() + " - "

o = os.popen("dcop amarok player title");
s += o.read().rstrip()

o = os.popen("dcop amarok player coverImage");
bubble("Amarok", s, o.read().rstrip())
o.close();
continue;
if re.match("volumeChange: [0-9]{1,3}", i):
o = os.popen("dcop amarok player coverImage");
bubble("Amarok", "Volume level: "+re.search("[0-9]{1,3}", i).group(0)+"%", o.read().rstrip())
o.close();
continue
---------------------------------------------------------------------------------------------------------------------------------------

3 months ago
Niels
Niels

@robin0800
Yeah thats the most logical way to do it except the problem is that everytime a song starts a 'new' script was called. So I could not just say n.update() because n would not exist in the second script. I fixed it by notifying the old script that it has to update trough dbus.

3 months ago
Cornwall
Cornwall

Wow, Niels! Great work! I love this addon!

3 months ago
Niels
Niels

I'm really really happy you like it and find it usefull :D

3 months ago
downward
downward

Hi! Great Add-On but why I can't see the album cover in notafications.

Iḿ usin Karmic Koala

3 months ago
Schokobecher
Schokobecher

I can confirm that covers are not shown.
Anyways:
Awesome.

3 months ago
Schokobecher
Schokobecher

Oh well nvm.
Reading would help:

"Re-add album art support"

3 months ago
Niels
Niels

@ downward & schokobecher:
I can pop it back in when I can get past this problem:
http://forums.mozillazine.org/viewtopic.phpf=19&t=1397685&sid=c0e9124341fd2bbb7873256fbf074165 ,
if someone can help that would be great ^.^

3 months ago
Cornwall
Cornwall

Only thing I'm good at is testing. :). I'd be happy to help, though.

Your link is 404'd, by the by.

3 months ago
Schokobecher
Schokobecher

Correct URL:
http://forums.mozillazine.org/viewtopic.php?f=19&t=1397685&
sid=c0e9124341fd2bbb7873256fbf074165%20,

I'll try to get into that problem.
Could take a while since I've no experience with xul and Addon programming :/

3 months ago
Spike1506
Spike1506

@Niels
resource://sb-artwork/0aec6dca5c04fcb55a9ec3777c56bd59.jpeg
I think those can be translated to:
/path/to/songbird/user/profile/artwork eg:
/home/joshua/.songbird2/4e6mggxm.default/artwork/0aec6dca5c04fcb55a9ec3777c56bd59.jpeg

3 months ago
Cornwall
Cornwall

Hi,

Something I've noticed:

In Jaunty, say I had two bubbles: the song title bubble on top, and the volume on bottom.

If I changed tracks with those two bubbles going on, then both of them would adjust to fit the song title bubble. Now, in Karmic, they overlap....

Bug in Notify-OSD, or this?

2 months ago
Cornwall
Cornwall

Whoops, forgot to mention.... I'm using a custom build that does away with that current nonsense of placing the notifications a little below the corner. It all works just the way it used to, just prettier. I'm assuming this would happen with the regular package as well.... Like if there was a song notification and an IM notification.

2 months ago
fcastillo
fcastillo

I think that this add-on should merge with this one:
http://addons.songbirdnest.com/addon/1754

The new one has a lot of great options... amazing ones... and album art is supported...

2 months ago
FokkerCharlie
FokkerCharlie

Also, I see that addon 1754 also works when using mini-mode. For this reason, I have had to defect, but that does not detract from the appreciation that I have for the creator of this addon...

As fcastillo says, a merger may be a good idea!

Charlie

about 1 month ago



Log in to Post a Comment


Download
Statistics
Downloads: 11,468

Average Rating:
4 out of 5  based on 18 ratings

Images: 1

Comments: 47

Last Updated: 3 months ago
Details
Name: ubuntu-notifier

Author: Niels

Version: 0.2.0.0 version history

Categories:


Log in to Add a Tag
Share
Embed:

Share: