This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Updated rating in OSD

Tags: None
(comma "," separated)
oscarlevin
Registered Member
Posts
7
Karma
0

Updated rating in OSD

Tue May 13, 2008 1:06 pm
I am trying to write a little bash script which will increase the rating of a currently playing song by half a star.  I will then trigger this script with a IR remote button, so I can sort of rate songs from the couch.  Problem is, after the script runs, I would like to see the new rating displayed on the OSD.  I can get the OSD to come up, but it comes up with the old rating, not the new one. 

Is there any way to get Amarok to "refresh" enough that when I call showOSD, it doesn't show the info from when the song first started playing?

If you are curious, here is my bash script:
Code: Select all
## Get the current songs rating:
current=`dcop amarok player rating`

## Set rating to 5 if song is unrated:
if [ $current = 0 ]; then   
   dcop amarok player setRating 5
## Otherwise increase rating by 1
elif [ $current -lt 10 ]; then
   let "current = $current + 1"
   dcop amarok player setRating $current
fi

##Display OSD:
dcop amarok player showOSD


Thanks.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell