Simple Now Playing script

Amarok 2.x Scripts

Source (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
5.8
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:

8 years ago

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

rascal58

8 years ago

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 !

Report

C

khaytsus

8 years ago

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.

Report

C

khaytsus

11 years ago

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.

Report

kisrokus

10 years ago

no, its not. I get this in the TXT:

isPlaying: false
status: 2

Report

C

khaytsus

10 years ago

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?

Report

kisrokus

10 years ago

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

Report

C

khaytsus

10 years ago

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.

Report

Oceanwaves

11 years ago

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

Report

C

khaytsus

11 years ago

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

Report

Oceanwaves

11 years ago

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

Report

C

khaytsus

11 years ago

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

Report

Oceanwaves

11 years ago

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

Oceanwaves

Report

C

khaytsus

11 years ago

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.

Report

kisrokus

11 years ago

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.

Report

8 years ago

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

12345678910
1
product-maker Razor13 Mar 24 2011 9 excellent
Be the first to comment
Oceanwaves
Jan 14 2010
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.6.1
updated Dec 23 2012
added Sep 27 2009
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0
System Tags addon