diff options
author | Anton Khirnov <wyskas@gmail.com> | 2008-12-26 17:04:23 +0100 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2008-12-26 17:04:23 +0100 |
commit | edd2092e234c6d0e2126effa93aa046739ac6b65 (patch) | |
tree | 568f02ebef944898188111703c474a29f41c5bd0 /clMonty.py | |
parent | 09c4607cdeabef879b002464cb5bfe908a5bb07f (diff) |
Remove trailing whitespace.
Diffstat (limited to 'clMonty.py')
-rw-r--r-- | clMonty.py | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -43,7 +43,7 @@ class Monty(QtCore.QObject): QtCore.QObject.__init__(self) self._client=None self._listeners={} - + self._curSongID=-1 self._curTime=-1 self._curState=-1 @@ -64,7 +64,7 @@ class Monty(QtCore.QObject): except: self._client=None return False - + self._raiseEvent('onConnect', None) try: self._updateLib() @@ -85,7 +85,7 @@ class Monty(QtCore.QObject): self._client.disconnect() self._client=None # don't kill timer, as it'll happen in timerEvent - + def isConnected(self): """Returns true if we're connected to MPD, false otherwise.""" return self._client!=None @@ -107,7 +107,7 @@ class Monty(QtCore.QObject): if self.isConnected()==False: return None return self._curSong - + def updateDB(self, paths): self._client.command_list_ok_begin() for path in paths: @@ -129,7 +129,7 @@ class Monty(QtCore.QObject): except Exception, d: print_exc() return None - + def repeat(self,val): self._client.repeat(val) def random(self,val): @@ -158,7 +158,7 @@ class Monty(QtCore.QObject): self._client.playid(id) else: self._client.playid() - + def pause(self): """Pause playing.""" self._client.pause(1) @@ -184,7 +184,7 @@ class Monty(QtCore.QObject): def seek(self, time): """Move the current playing time to $time.""" self._client.seekid(self._curSongID, time) - + def deleteFromPlaylist(self, list): """Remove all songIDs in $list from the playlist.""" self._client.command_list_ok_begin() @@ -192,7 +192,7 @@ class Monty(QtCore.QObject): self._client.deleteid(id) self._client.command_list_end() self._updatePlaylist() - + def addToPlaylist(self, paths): """Add all files in $paths to the current playlist.""" self._client.command_list_ok_begin() @@ -207,7 +207,7 @@ class Monty(QtCore.QObject): self._client.setvol(volume) def getVolume(self): return int(self.getStatus()['volume']) - + def addListener(self, event, callback): """Add $callback to the listeners for $event.""" if not(event in self.events): @@ -261,7 +261,7 @@ class Monty(QtCore.QObject): self.simpleThread(listener, params).run() except: print_exc() - + def timerEvent(self, event): "Check for changes since last check." try: @@ -276,7 +276,7 @@ class Monty(QtCore.QObject): self._raiseEvent('onDisconnect', None) self.killTimer(self._timerID) return - + " check if song has changed" if song.getID()>=0: curID=song.getID() |