fuzzythebear Guru
Joined: 28 Nov 2004 Posts: 317
|
Posted: Fri Sep 01, 2006 11:06 pm Post subject: lemmings script / pyxmms returns strange result |
|
|
Hi's
I got an issue with xmms / pyxmms and the lemmings script for XChat
When you play an ogg and do a /xmms playing ( code to follow )
it returns something like this :
xyz is currently listening to Dream Theater - This Dying Soul (01:02 / Live stream)
It aint a live stream .. it's a ogg file ..
I checked the code portion relevant to this :
#XMMS section . ProGuy did it under duress.Strong arm tactics have
#been used to get this work done.No animals were harmed during this phase.
if xmms_installed:
class FuzzyXMMS:
def __init__(self):
self.currentlyPlaying = -1
self.announceChannels = []
def constructPlayingString(self):
if xmms.is_playing():
self.currentlyPlaying = xmms.get_playlist_pos()
totalTime = xmms.get_playlist_time(self.currentlyPlaying)
playedTime = xmms.get_output_time()
return xmms.get_playlist_title(self.currentlyPlaying) +\
" (" + self.formatTime(playedTime) + " / " +\
self.formatTime(totalTime) + ")"
def showPlaying(self):
xchat.command("me is currently listening to " +
self.constructPlayingString())
def announceToChannel(self, channel):
xchat.command("msg " + channel + " I'm listening to " +
self.constructPlayingString())
# Time is given in ms to formatTime, it will output a nice string
def formatTime(self, time):
mins = time / 60000
rem = time % 60000
secs = rem / 1000
if mins < 10:
shMins = "0"+str(mins)
else:
shMins = str(mins)
if secs < 10:
shSecs = "0"+str(secs)
else:
shSecs = str(secs)
return shMins + ":" + shSecs
Nowhere is there a mention of Live stream..
would this be a xmms bug ?
did anyone ran in this oddity with other scripts ?
anyone got a workaround ?
anyone know anything that can help us fix this ?
Thanks
FTB _________________ There's this once i thought i had made a mistake .. but i was wrong |
|