=== modified file 'data/ui/preferences/playback.ui' --- data/ui/preferences/playback.ui 2012-01-10 05:46:53 +0000 +++ data/ui/preferences/playback.ui 2012-01-11 04:09:15 +0000 @@ -311,6 +311,20 @@ 10 + + + Automatically advance to the next track + True + True + False + True + + + False + False + 11 + + === modified file 'xl/player/engine_normal.py' --- xl/player/engine_normal.py 2011-12-16 06:43:25 +0000 +++ xl/player/engine_normal.py 2012-01-11 04:07:05 +0000 @@ -35,7 +35,7 @@ import gst from xl.nls import gettext as _ -from xl import common, event +from xl import common, event, settings from xl.player import pipe, _base logger = logging.getLogger(__name__) @@ -63,10 +63,13 @@ """ called at the end of a stream """ - self.queue.next() + if settings.get_option("%s/auto_advance" % self._name, True): + self.queue.next() def _on_about_to_finish(self, pbin): - tr = self.queue.next(autoplay=False) + tr = None + if settings.get_option("%s/auto_advance" % self._name, True): + tr = self.queue.next(autoplay=False) if tr: self.play(tr, stop_last=False) else: === modified file 'xl/player/engine_unified.py' --- xl/player/engine_unified.py 2012-01-11 04:03:47 +0000 +++ xl/player/engine_unified.py 2012-01-11 04:07:19 +0000 @@ -92,7 +92,9 @@ #if stream.track != self.current: # return if not settings.get_option("%s/crossfading" % self._name, False): - tr = self.queue.next(autoplay=False) + tr = None + if settings.get_option("%s/auto_advance" % self._name, True): + tr = self.queue.next(autoplay=False) self.unlink_stream(stream) if tr is None: self.stop() @@ -196,7 +198,9 @@ return 0.01 <= current <= 1 def _start_crossfade(self, *args): - tr = self.queue.next(autoplay=False) + tr = None + if settings.get_option("%s/auto_advance" % self._name, True): + tr = self.queue.next(autoplay=False) if tr is not None: self.play(tr, user=False) if self._timer_id: === modified file 'xlgui/preferences/playback.py' --- xlgui/preferences/playback.py 2012-01-10 05:46:53 +0000 +++ xlgui/preferences/playback.py 2012-01-11 04:09:58 +0000 @@ -133,6 +133,10 @@ class EnqueueBeginsPlayback(widgets.CheckPreference): default = True name = 'queue/enqueue_begins_playback' + +class AutoAdvancePlayer(widgets.CheckPreference): + default = True + name = 'player/auto_advance' class UnifiedConditional(widgets.Conditional): """