Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rodknocker

macrumors 6502
Jul 4, 2011
298
10
I've created an app which uses AppleScripts and Terminal-Notifier (https://github.com/alloy/terminal-notifier) to display track names as notification centre notifications when the song changes.

I've put it all into a neat little application package for people to easily install and use themselves (see the instructions file inside the ZIP archive).

Here's the link to the ZIP file containing everything you need.

http://www.mediafire.com/?9h01wlo18ptly

Give it a go and let me know how it goes!

Where to download your wallpaper? ;-)
 

kennco

macrumors newbie
Oct 16, 2010
18
0
Germany
What about Radio Stram

@heghead
Like your little App. Thanks for your work.
Do you think it is possible to bring information Artist/Titel from Radio stream also to the notification.
i.e. http://80.237.156.13/lounge-at
It shows the information in iTunes
bildschirmfoto-2012-08-08-um-16-41-13.png


An of course when it changes. The next information of artist/titel comes from the stream. ;)

Would be great. Hope to see more of this soon.
Cheers
 
Last edited:

heghead

macrumors member
May 30, 2010
33
0
Australia
@heghead
Like your little App. Thanks for your work.
Do you think it is possible to bring information Artist/Titel from Radio stream also to the notification.
i.e. http://80.237.156.13/lounge-at
It shows the information in iTunes
Image

An of course when it changes. The next information of artist/titel comes from the stream. ;)

Would be great. Hope to see more of this soon.
Cheers

What a great idea! In fact it is so great that I have gone ahead and added it!!

Version 1.2 of NowPlaying is now available
It simply adds support for iTunes radio :)

Download here:
http://www.mediafire.com/?9h01wlo18ptly

Thanks for the great suggestion kennco!
 

gavingamble

macrumors newbie
Aug 8, 2012
1
0
thanks

Just registered to say thanks, it's exactly what I was surfing for.
So yeah, cheers for sharing it with us,

Gav
 

bjett92

macrumors 6502a
Oct 22, 2007
733
1
Indy, IN
Thank you! And if you don't want the current song to show in the notification center, just turn off recent items in the notification center settings.
 

heghead

macrumors member
May 30, 2010
33
0
Australia
Perfect little app, thanks heghead. Do ya think you could add iTunes artwork to the notification?

I would LOVE to be able to do that!

...but...

I have looked it and without editing Mountain Lion's core files, it is impossible to customize the icon which is shown. It must be the app's icon. :(

Thanks anyway for the suggestion :)

----------

BTW is there something we can do for you?
Little Donation or something else? Unfortunately I can't invite you to a drink or so. ;)

Hahaha no need thanks :)

I really like it when people log into the forums to say thanks to the developer and give new ideas, and you've already done that :)

Thanks again!
 

Blackened Apple

macrumors regular
Original poster
Jun 15, 2012
116
0
Hey heghead,

I just wanted to thank you very much, as the OP ;) I'll only receive my MBA next monday, but I can already see from the feedback that your little app is just what I was looking for. So congratulations on the brilliant work ;)
 

heghead

macrumors member
May 30, 2010
33
0
Australia

eagandale4114

macrumors 65816
May 20, 2011
1,011
1
What a great idea! In fact it is so great that I have gone ahead and added it!!

Version 1.2 of NowPlaying is now available
It simply adds support for iTunes radio :)

Download here:
http://www.mediafire.com/?9h01wlo18ptly

Thanks for the great suggestion kennco!

That is epic.
You did say that editing system files was required for dynamic notification center icons. What tweaks are you looking at? Im curious.
 

heghead

macrumors member
May 30, 2010
33
0
Australia
That is epic.
You did say that editing system files was required for dynamic notification center icons. What tweaks are you looking at? Im curious.

To be honest, I haven't actually looked too deeply into it yet.

Eloy Durán, the creator of terminal-notifer, has this quoted in the application's readme file:

The Notification Center always uses the application’s own icon, there’s currently no way to specify a custom icon for a notification. The only way to use this tool with your own icon is to include a build of terminal-notifier with your icon instead.
- https://github.com/alloy/terminal-notifier/blob/master/README.markdown

In order to get the current icon to display, I had to download the sourcecode of terminal-notifer and change it's icon and name in xCode, then recompile it.

I think that until Apple officially adds support for dynamic icons in notification center, it's won't be possible... Unless there is someone else who is much much much smarter than me and could re-write/tweak the Notification Center app in CoreComponents to support it (I don't even know if that would be possible... lol) :)

Cheers! I hope that answered your question :)
 

richard.mac

macrumors 603
Feb 2, 2007
6,292
5
51.50024, -0.12662
Very epic! and exactly how Apple would do it.. so I like it :D

I didn't like how the songs showed in the Notification drawer, so I simply disabled Show in Notification Centre [5 Recent Items] for iTunes in Notifications prefs.

Also, for anyone still wondering about resources, for me it uses the same resources when iTunes is closed and when playing a song (0.4% & 8.7MB), about the same CPU usage as the Flash plugin. hedhead, maybe the CPU usage could be made 0.0% when idle if possible? Regardless, still very impressive!
 

heghead

macrumors member
May 30, 2010
33
0
Australia
Very epic! and exactly how Apple would do it.. so I like it :D

I didn't like how the songs showed in the Notification drawer, so I simply disabled Show in Notification Centre [5 Recent Items] for iTunes in Notifications prefs.

Also, for anyone still wondering about resources, for me it uses the same resources when iTunes is closed and when playing a song (0.4% & 8.7MB), about the same CPU usage as the Flash plugin. hedhead maybe the CPU usage could be made 0.0% when idle if possible? Regardless, still very impressive!

Hey Richard, glad you like it. I will be releasing a new version soon which will improve performance when iTunes is closed.

Cheers
 

kennco

macrumors newbie
Oct 16, 2010
18
0
Germany
Maybe it's nothing, but I saw this today.

bildschirmfoto-2012-08-09-um-08-56-36.png


Don't know why not all the information is shown.
Just to let you know. Nothing annoying. ;)
 
Last edited by a moderator:

heghead

macrumors member
May 30, 2010
33
0
Australia
Maybe it's nothing, but I saw this today.

Image

Don't know why not all the information is shown.
Just to let you know. Nothing annoying. ;)

Yes, this is caused because when iTunes is streaming from a radio station and you ask for the information via applescript it is sent through as a single string (eg "Beautiful Day - U2").

Unlike when you are playing from your library, and they are provided in separate strings: Artist ("U2") and Song name ("Beautiful Day").

Because of this, the script needs to divide up the string in order to display it correctly as a notification. I have programmed it to chop out the (note the spaces either side) " - " and take each side and set one as the artist and one as the song name.

If, however, the song name or artist name contains " - " (with the spaces), it chops at the wrong point. :( Correcting this would be quite tricky. I'll put this in the "Known bugs" list, but I probably won't be able to fix it anytime soon.

Thanks anyway for letting me know :)
 

mopatops

macrumors regular
Jul 21, 2011
159
32
UK
Just wanted to add a +1 to the huge thankyous you're getting! This was going to be the one I missed since deleting growl so thanks a million. :D

Would it be much work to add Album name to the notification? :eek:
 

s0mojo

macrumors member
Sep 15, 2011
32
8
Soton, UK
Exactly what I was after, something simple and uses tiny amount of resources! Thank you heghead very much from a mac newbie!;)
 

nyolc8

macrumors regular
Jul 20, 2012
205
1
As I said, I really love this little app. I modified it to get the title "Now Playing" in the notification center to show up in my language by this:

I made a new folder in Now Playing.app/Contents/Resources/Now Playing.app/Contents/Resources/hu.lproj/
(hu is my language)

I copied the "InfoPlist.strings" file from Chess.app/Contents/Resources/hu.lproj/
into the newly created folder, then I keeped only CFBundleDisplayName section in the file and modified the value of it to say "now playing" in my language.

result:
OyKUR.png


So my suggestion is that it could be translated into various language.:)

And another thing:
I looked into the script file and I found this:
Code:
tell application "System Events" to (name of processes) [B]contains[/B] appName

So if "iTunes Helper" running only, it's also triggers the script. Or am I wrong?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.