]> git.sesse.net Git - vlc/blobdiff - modules/demux/playlist/playlist.c
input options whitelisting, step 2 (refs #1371)
[vlc] / modules / demux / playlist / playlist.c
index cf322a3a7a8cbee6776ede3f7e0f221c21098371..63d492a2db85d782ac4a5e3457bf63c636d76170 100644 (file)
@@ -25,7 +25,7 @@
  * Preamble
  *****************************************************************************/
 #include <vlc/vlc.h>
-#include <vlc/input.h>
+#include <vlc_demux.h>
 #include <vlc_playlist.h>
 
 #include "playlist.h"
  * Module descriptor
  *****************************************************************************/
 #define AUTOSTART_TEXT N_( "Auto start" )
-/// \bug [String] Why \n ?
 #define AUTOSTART_LONGTEXT N_( "Automatically start playing the playlist " \
-                "content once it's loaded.\n" )
+                "content once it's loaded." )
 
 #define SHOW_ADULT_TEXT N_( "Show shoutcast adult content" )
 #define SHOW_ADULT_LONGTEXT N_( "Show NC17 rated video streams when " \
                 "using shoutcast video playlists." )
 
+#define SKIP_ADS_TEXT N_( "Skip ads" )
+#define SKIP_ADS_LONGTEXT N_( "Use playlist options usually used to prevent " \
+    "ads skipping to detect ads and prevent adding them to the playlist." )
+
+#define EXTVLCOPT_TEXT N_( "Enable parsing of EXTVLCOPT: options" )
+#define EXTVLCOPT_LONGTEXT N_( "Enable parsing of EXTVLCOPT: options in m3u " \
+    "playlists. This option is default disabled to prevent untrusted sources " \
+    "using VLC options without the user's knowledge." )
+
 vlc_module_begin();
     add_shortcut( "playlist" );
     set_category( CAT_INPUT );
@@ -49,9 +57,15 @@ vlc_module_begin();
 
     add_bool( "playlist-autostart", 1, NULL,
               AUTOSTART_TEXT, AUTOSTART_LONGTEXT, VLC_FALSE );
+        change_safe();
 
     add_integer( "parent-item", 0, NULL, NULL, NULL, VLC_TRUE );
         change_internal();
+        change_safe();
+
+    add_bool( "playlist-skip-ads", 1, NULL,
+              SKIP_ADS_TEXT, SKIP_ADS_LONGTEXT, VLC_FALSE );
+        change_safe();
 
     set_shortname( _("Playlist") );
     set_description( _("Playlist") );
@@ -59,6 +73,8 @@ vlc_module_begin();
         set_description( _("M3U playlist import") );
         add_shortcut( "m3u-open" );
         set_capability( "demux2", 10 );
+        add_bool( "m3u-extvlcopt", VLC_FALSE, NULL,
+                  EXTVLCOPT_TEXT, EXTVLCOPT_LONGTEXT, VLC_FALSE );
         set_callbacks( E_(Import_M3U), E_(Close_M3U) );
     add_submodule();
         set_description( _("PLS playlist import") );
@@ -93,6 +109,7 @@ vlc_module_begin();
         set_callbacks( E_(Import_Shoutcast), E_(Close_Shoutcast) );
         add_bool( "shoutcast-show-adult", VLC_FALSE, NULL,
                    SHOW_ADULT_TEXT, SHOW_ADULT_LONGTEXT, VLC_FALSE );
+        change_safe();
     add_submodule();
         set_description( _("ASX playlist import") );
         add_shortcut( "asx-open" );
@@ -113,6 +130,15 @@ vlc_module_begin();
         add_shortcut( "gvp" );
         set_capability( "demux2", 10 );
         set_callbacks( E_(Import_GVP), E_(Close_GVP) );
+    add_submodule();
+        set_description( _("Dummy ifo demux") );
+        set_capability( "demux2", 12 );
+        set_callbacks( E_(Import_IFO), E_(Close_IFO) );
+    add_submodule();
+        set_description( _("iTunes Music Library importer") );
+        add_shortcut( "itml" );
+        set_capability( "demux2", 10 );
+        set_callbacks( E_(Import_iTML), E_(Close_iTML) );
 vlc_module_end();