changeset 35381:746e2e0577b2

Without current playlist item, reset guiInfo's Filename and StreamType. This fixes a blocking when deleting the playlist while or after playback and trying to play again. Reported by Hans-Dieter Kosch, hdkosch kabelbw de. (Reset them either after playback when playing or immediately if not playing which will display the filename played as long as possible.)
author ib
date Sun, 25 Nov 2012 14:38:58 +0000
parents b18c14526662
children b85d632c3fe1
files gui/interface.c gui/ui/gtk/playlist.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Sun Nov 25 14:18:12 2012 +0000
+++ b/gui/interface.c	Sun Nov 25 14:38:58 2012 +0000
@@ -789,6 +789,11 @@
 
             filename = NULL;
 
+            if (!listMgr(PLAYLIST_ITEM_GET_CURR, 0) &&
+                (guiInfo.StreamType == STREAMTYPE_FILE ||
+                 guiInfo.StreamType == STREAMTYPE_STREAM))
+                uiSetFileName(NULL, NULL, STREAMTYPE_DUMMY);
+
             guiInfo.ElapsedTime   = 0;
             guiInfo.Position      = 0;
             guiInfo.AudioChannels = 0;
--- a/gui/ui/gtk/playlist.c	Sun Nov 25 14:18:12 2012 +0000
+++ b/gui/ui/gtk/playlist.c	Sun Nov 25 14:38:58 2012 +0000
@@ -32,6 +32,7 @@
 #include "stream/stream.h"
 
 #include "gui/cfg.h"
+#include "gui/interface.h"
 #include "gui/ui/widgets.h"
 #include "gui/util/list.h"
 #include "gui/util/mem.h"
@@ -215,6 +216,7 @@
 //	  guiInfo.NewPlay=GUI_FILE_NEW;
 //	  guiInfo.StreamType=STREAMTYPE_FILE;
 	 }
+	else if (!guiInfo.Playing) uiSetFileName(NULL, NULL, STREAMTYPE_DUMMY);
        }
   case 0: // cancel
        HidePlayList();