minor cleanups

This commit is contained in:
Tim Bentley 2011-04-29 21:08:22 +01:00
parent ddf9c3b61b
commit 69395170e1

View File

@ -132,6 +132,8 @@ class MediaMediaItem(MediaManagerItem):
unicode(translate('MediaPlugin.MediaItem', unicode(translate('MediaPlugin.MediaItem',
'The file %s no longer exists.')) % filename) 'The file %s no longer exists.')) % filename)
return False return False
if not self.mediaObject:
self.mediaObject = Phonon.MediaObject(self)
self.mediaObject.stop() self.mediaObject.stop()
self.mediaObject.clearQueue() self.mediaObject.clearQueue()
self.mediaObject.setCurrentSource(Phonon.MediaSource(filename)) self.mediaObject.setCurrentSource(Phonon.MediaSource(filename))
@ -217,4 +219,3 @@ class MediaMediaItem(MediaManagerItem):
def createPhonon(self): def createPhonon(self):
if not self.mediaObject: if not self.mediaObject:
self.mediaObject = Phonon.MediaObject(self) self.mediaObject = Phonon.MediaObject(self)