diff options
author | Anton Khirnov <wyskas@gmail.com> | 2008-12-27 09:29:52 +0100 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2008-12-27 09:29:52 +0100 |
commit | 2aa76f9a08816be359b25394884abaa47e0fdda6 (patch) | |
tree | adca2bed3dcea7697cb77709063b67a8bcf47b84 /plugins/Library.py | |
parent | 15d1d996f1a8539fb0dec11465a336bd5f396d20 (diff) |
On add to playlist start playing the first added song.
Diffstat (limited to 'plugins/Library.py')
-rw-r--r-- | plugins/Library.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Library.py b/plugins/Library.py index 4676d5f..c599f06 100644 --- a/plugins/Library.py +++ b/plugins/Library.py @@ -57,14 +57,14 @@ class pluginLibrary(Plugin): end=len(paths) self.setStatus('Adding '+str(len(songs))+' songs to library: %i%%'%(int(100*start/len(paths)))) doEvents() - self.monty.addToPlaylist(paths[start:end]) + ids = self.monty.addToPlaylist(paths[start:end]) start+=CHUNK_SIZE self.setStatus('') doEvents() self.getWinMain().fillPlaylist() - if not self.monty.isPlaying(): - self.monty.play(None) + if (not self.monty.isPlaying()) and ids: + self.monty.play(ids[0]) def _getSettings(self): modes=QtGui.QTextEdit() |