| Re: Re: Not Playing Dec 12 2007 on content AmarokPidgin | np ;)
Well, I wasn't going to post this, but since someone has already gotten use out of one modification, perhaps someone will find use in this.
I modified the application to MY liking. Now, it says:
"Music: $artist - $title" by default
"Music: [Paused] $artist - $title" when I pause
"Music: --Song Change--" (for 5 seconds) when I change songs.
This was modified from Version 0.1.7 of AmarokPidgin.
Here's what I changed:
added "import time" to the top.
changed "def listenForSongChanges(self)" function to:
def listenForSongChanges(self):
"Listens for song changes from stdin. This method is blocking."
while True:
message = stdin.readline()
self.log("Got message: %s" % message)
# Function that given a list, will tell you if any of the
# strings are in message
is_in = lambda li: len([x for x in li if x in message]) > 0
if is_in( ("trackChange", "playing") ):
time.sleep(1)
trackCurrentTime = self.get_trackCurrentTime()
if trackCurrentTime < 5:
self.update_display("Music: --Song Change--")
time.sleep(5)
message = self.get_currently_playing()
self.song = message
self.update_display("Music: " + message)
elif is_in( ("empty", "idle", "paused") ):
if self.purple.PurpleSavedstatusGetCurrent() == self.status:
self.purple.PurpleSavedstatusActivate(self.default)
message = self.get_currently_playing()
self.song = message
self.update_display("Music: [Paused] " + message)
self.log("Default: %d" % self.default)
elif "configure" in message:
self.configure()
added "def get_trackCurrentTime(self)" function:
def get_trackCurrentTime(self):
"Gets the trackCurrentTime from amarok."
time = getoutput("dcop amarok player trackCurrentTime 2> /dev/null")
return int(time)
..if you want the whole AmarokPidgin.py file (since the tabs will be all screwed up here), email me at fedcba098 |at| g|/\|ail
Enjoy :) |
| | | Not Playing Mod Dec 6 2007 on content AmarokPidgin | I found this block of code in the
~/.kde/share/apps/amarok/scripts/AmarokPidgin/AmarokPidgin.py file:
elif is_in( ("empty", "idle", "paused") ):
if self.purple.PurpleSavedstatusGetCurrent() == self.status:
self.purple.PurpleSavedstatusActivate(self.default)
self.song = None
...and I changed it to:
elif is_in( ("empty", "idle", "paused") ):
if self.purple.PurpleSavedstatusGetCurrent() == self.status:
self.purple.PurpleSavedstatusActivate(self.default)
self.song = None
self.update_display("Not Listening")
...now it updates when I pause or stop my music. I wish this was an option under "configure." It probably shouldn't do this by default, though.
Enjoy ;)
|
| | | Re: Gentoo Dec 6 2007 on content AmarokPidgin | http://gentoo-wiki.com/AmarokPidgin |
| | | Re: Gentoo Dec 6 2007 on content AmarokPidgin | If you get the following error:
The script 'AmarokPidgin' exited with error code: 1
Traceback (most recent call last):
File "/home/username/.kde/share/apps/amarok/scripts/AmarokPidgin/AmarokPidgin.py", line 5, in ?
import dbus
ImportError: No module named dbus
You need to get the following package:
dev-python/dbus-python |
| | | Gentoo Dec 6 2007 on content AmarokPidgin | After a long struggle, I eventually got it to work in Gentoo. Here's how:
Here's what I was using:
media-sound/amarok-1.4.7-r2 (with USE python)
net-im/pidgin-2.2.2 (with USE dbus)
Download, Install, and Run AmarokPidgin
1) Download from--here
2) Inside of Amarok, go to Tools > Script Manager
3) Select "Install Script" and browse and select AmarokPidgin
4) Select AmarokPidgin on the left and select "Run"
Configure AmarokPidgin
1) Inside of Amarok, go to Tools > Script Manager
2) Select Amarok Pidgin on the left and select "configure"
Note: If pressing the "configure" button seemingly does nothing, you need to install the following package:
kde-base/kdialog
3) Choose Status
4) Type "Now Playing $artist - $title" --or something similar
5) Change Pidgin status to "Media"
Hope this helps. |
| |
Search people Current visitors New users Birthdays Most active users Back
|
|