Simple Now Playing script

Amarok 2.x Scripts

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

1
Become a Fan
5.7

Description:
This is a very simple Now Playing script which outputs the data to your homedir so it may be parsed by any other program. The output format is based from an Amarok 1.x script written by Daniel Dormann and the script itself was modified from the SkypeNowPlaying script by tuwe.

Known limitation: If playing, when Amarok exits the script is unaware. No known Amarok 'exit' trigger.
Last changelog:

0.6.1 - Changed script filename
0.6 - Fixed leftover debug line
0.5 - Fixed weird track length issue
0.4 - Added status check to onTrackChange to update for a small regression in Amarok 2.2.2 (onTrackChange called on startup now regardless of if Amarok is playing or not)
0.3 - Fixed some cover art information, repeatPlaylist repeatTrack and randomMode called from Amarok now, were hard coded
0.2 - Fixed homedir path, thanks Knoellchen!
0.1 - Original Release


Ratings & Comments

14 Comments

rascal58

please name script correctly so Amarok script manager can select it. Script current name: 112728-SimpleNowPlaying.tar.bz2 suggested name: 112728-SimpleNowPlaying.amarokscript.tar.bz2 with this change the script is found and installed. Otherwise the script works !

khaytsus

Sorry about the LONG delay on fixing this, I lost track of the email. I've uploaded 0.6.1 which the only change is the version and the filename. Hopefully this works as expected now.

khaytsus

I apparently didn't increment the version number in the script, so if it's working for you now then don't worry about re-downloading.

kisrokus

no, its not. I get this in the TXT: isPlaying: false status: 2

khaytsus

I have downloaded the script on a test machine with no Amarok or script installed before, just to make sure I wasn't using the wrong script etc.. All is working for me. Can you please explain the steps to where you're getting an incorrect status?

kisrokus

So the thing is that I want use the in kopete the "now listening to" feature. Is this script helping kopete as well or just creating the ~/nowPlaying.txt Probably my amarok is bugged. What do you think? Amarok v 2.2.1.90 KDE 4.3.1 "release 6" openSUSE 11.2

khaytsus

The script creates the file, it's up to other programs to consume it. The reason I created it was that I had several programs which did consume that file. As for why your Amarok isn't working, honestly I don't know. Amarok 2.2.2 here.

Oceanwaves

Hi, I installed Amarok 2.2.2 today and found that SimpleNowPlaying 0.2 now reports Amarok is playing even if it's not. I just start Amarok 2.2.2 and ~/nowPlaying.txt looks like this: isPlaying: true (should be false) status: 0 repeatTrack: 0 repeatPlaylist: 0 randomMode: 0 artist: title: track: 0 album: length: 00:00 genre: year: comment: bitrate: 0 type: samplerate: 0 cover: score: 0 rating: 0 playcounter: 0 Oceanwaves

khaytsus

Agreed, Amarok is now calling onTrackChange on startup which is new. I am updating the script and will upload it shortly.

Oceanwaves

Wow, you're fast! Thanks, Script is working fine again! BTW: I noticed huge differences in the track length reported by Amarok vs. your script, e.g. Amarok (correctly) reports 2:57 for a track while the script reports length: 01:10:00 No problem for me since I don't need the track length at the moment, just wanted to mention it. Thanks again, Oceanwaves

khaytsus

Doh, you're right.... I wonder if it's been like that all along or this is new? New version posting now..

Oceanwaves

Ahem...v0.5 looks completely broken here. Even while Amarok 2.2.2 is playing a track it still says "isPlaying: false" :-(. Oceanwaves

khaytsus

Sorry everyone, I'm a dufus. I apparently didn't restart the script for my final regression, I removed a variable I was using for debugging and didn't remove the output line for it. Fixed, please update.

kisrokus

I am sorry, where can I get the latest version? Because this one i can download here: 112728-SimpleNowPlaying.tar.gz And this has version 0.5 in it... and correct me if I am wrong but 0.6 is now the fixed version.

Pling
0 Affiliates
Details
license
version 0.6.1
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

Other Amarok 2.x Scripts:

raya
raya1234
last update date: 15 years ago

Score 5.0

Partition Assistant
shiny521
last update date: 15 years ago

Score 5.0

google-clone
jenifferhomes
last update date: 15 years ago

Score 5.6

Quran Audio Library
boubakr92
last update date: 12 years ago

Score 4.4

Remove Current Track
alexoleshkevich
last update date: 14 years ago

Score 4.7

indoLyrics
cyrus007
last update date: 14 years ago

Score 4.7



System Tags