changeset 34690:eeb74ce15120

Fix bug with playlist playback. When <stop> is pressed and you shift to another track and press <play>, the track is played twice (before advancing to the next element in the list). Reported by drake ch, drake.ch hotmail com. When shifting to another track, set information that at the end of playback of the current track the next track to be played shall not be determined (!uiGotoTheNext) only if currently playing. That is because the track shifting function itself (which already has determined the next track to be played) will end the playback of the current track (and start the next one) only if currently playing. If not playing, the next track to be played after the end of playback of the current track (determined by the track shifting function) must be determined again (uiGotoTheNext).
author ib
date Mon, 27 Feb 2012 22:09:34 +0000
parents e92fb6cc0836
children 65b8e2116c99
files gui/ui/actions.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/actions.c	Sat Feb 25 18:26:31 2012 +0000
+++ b/gui/ui/actions.c	Mon Feb 27 22:09:34 2012 +0000
@@ -258,7 +258,7 @@
 
         if (curr) {
             uiSetFileName(curr->path, curr->name, STREAMTYPE_FILE);
-            uiGotoTheNext = 0;
+            uiGotoTheNext = (guiInfo.Playing ? 0 : 1);
             break;
         }
 
@@ -314,7 +314,7 @@
 
         if (prev) {
             uiSetFileName(prev->path, prev->name, STREAMTYPE_FILE);
-            uiGotoTheNext = 0;
+            uiGotoTheNext = (guiInfo.Playing ? 0 : 1);
             guiInfo.Track--;
             break;
         }
@@ -375,7 +375,7 @@
 
         if (next) {
             uiSetFileName(next->path, next->name, STREAMTYPE_FILE);
-            uiGotoTheNext = 0;
+            uiGotoTheNext = (guiInfo.Playing ? 0 : 1);
             guiInfo.Track++;
             break;
         }