Don't unconditionally add a file selector playlist filter.
authorib <ib@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 10 Jun 2018 15:59:24 +0000 (15:59 +0000)
committerib <ib@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 10 Jun 2018 15:59:24 +0000 (15:59 +0000)
If playlist parsing is disabled by MPlayer, playlist playback will be
impossible. So check for it and omit the playlist filter in case the
parsing is disabled. It would otherwise be confusing for the user to be
able to select a playlist that won't play then.

git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38111 b3059339-0415-0410-9bf9-f77b7e298cf2

gui/dialog/fileselect.c

index 92715f0..28ed789 100644 (file)
@@ -52,6 +52,7 @@
 #include "config.h"
 #include "help_mp.h"
 #include "mpcommon.h"
+#include "mplayer.h"
 #include "libavutil/common.h"
 #include "stream/stream.h"
 
@@ -870,6 +871,7 @@ void ShowFileSelector(int type)
         fsList_items = NULL;
 
         for (i = 0; fsVideoAudioFilterNames[i][0]; i++)
+            if ((strcmp(fsVideoAudioFilterNames[i][0], MSGTR_GUI_FilterFilePlaylist) != 0) || allow_playlist_parsing)
             fsList_items = g_list_append(fsList_items, fsVideoAudioFilterNames[i][0]);
 
         k = fsLastVideoAudioFilterSelected;