Commit 63c67b8e authored by Thomas Guillem's avatar Thomas Guillem

core: move parsing options to the playlist category

These options don't belong to the demuxer anymore.

The "recursive" option is not used by the demux but by the input thread.
The other options can be used by any stream_t.
parent 77a7a060
......@@ -85,46 +85,12 @@ static int Import_Dir( vlc_object_t *p_this )
return VLC_SUCCESS;
}
static const char *const psz_recursive_list[] = {
"none", "collapse", "expand" };
static const char *const psz_recursive_list_text[] = {
N_("None"), N_("Collapse"), N_("Expand") };
#define RECURSIVE_TEXT N_("Subdirectory behavior")
#define RECURSIVE_LONGTEXT N_( \
"Select whether subdirectories must be expanded.\n" \
"none: subdirectories do not appear in the playlist.\n" \
"collapse: subdirectories appear but are expanded on first play.\n" \
"expand: all subdirectories are expanded.\n" )
#define IGNORE_TEXT N_("Ignored extensions")
#define IGNORE_LONGTEXT N_( \
"Files with these extensions will not be added to playlist when " \
"opening a directory.\n" \
"This is useful if you add directories that contain playlist files " \
"for instance. Use a comma-separated list of extensions." )
#define SHOW_HIDDENFILES_TEXT N_("Show hidden files")
#define SHOW_HIDDENFILES_LONGTEXT N_( \
"Ignore files starting with '.'" )
vlc_module_begin()
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_DEMUX )
set_shortname( N_("Directory") )
set_description( N_("Directory import") )
add_shortcut( "directory" )
set_capability( "demux", 10 )
set_callbacks( Import_Dir, NULL )
add_string( "recursive", "collapse" , RECURSIVE_TEXT,
RECURSIVE_LONGTEXT, false )
change_string_list( psz_recursive_list, psz_recursive_list_text )
add_string( "ignore-filetypes", "m3u,db,nfo,ini,jpg,jpeg,ljpg,gif,png,pgm,"
"pgmyuv,pbm,pam,tga,bmp,pnm,xpm,xcf,pcx,tif,tiff,lbm,sfv,txt,"
"sub,idx,srt,cue,ssa",
IGNORE_TEXT, IGNORE_LONGTEXT, false )
add_bool( "show-hiddenfiles", false,
SHOW_HIDDENFILES_TEXT, SHOW_HIDDENFILES_LONGTEXT, false )
vlc_module_end()
......@@ -1112,6 +1112,29 @@ static const char *const ppsz_prefres[] = {
#define METADATA_NETWORK_TEXT N_( "Allow metadata network access" )
static const char *const psz_recursive_list[] = {
"none", "collapse", "expand" };
static const char *const psz_recursive_list_text[] = {
N_("None"), N_("Collapse"), N_("Expand") };
#define RECURSIVE_TEXT N_("Subdirectory behavior")
#define RECURSIVE_LONGTEXT N_( \
"Select whether subdirectories must be expanded.\n" \
"none: subdirectories do not appear in the playlist.\n" \
"collapse: subdirectories appear but are expanded on first play.\n" \
"expand: all subdirectories are expanded.\n" )
#define IGNORE_TEXT N_("Ignored extensions")
#define IGNORE_LONGTEXT N_( \
"Files with these extensions will not be added to playlist when " \
"opening a directory.\n" \
"This is useful if you add directories that contain playlist files " \
"for instance. Use a comma-separated list of extensions." )
#define SHOW_HIDDENFILES_TEXT N_("Show hidden files")
#define SHOW_HIDDENFILES_LONGTEXT N_( \
"Ignore files starting with '.'" )
#define SD_TEXT N_( "Services discovery modules")
#define SD_LONGTEXT N_( \
"Specifies the services discovery modules to preload, separated by " \
......@@ -2062,6 +2085,16 @@ vlc_module_begin ()
add_bool( "metadata-network-access", false, METADATA_NETWORK_TEXT,
METADATA_NETWORK_TEXT, false )
add_string( "recursive", "collapse" , RECURSIVE_TEXT,
RECURSIVE_LONGTEXT, false )
change_string_list( psz_recursive_list, psz_recursive_list_text )
add_string( "ignore-filetypes", "m3u,db,nfo,ini,jpg,jpeg,ljpg,gif,png,pgm,"
"pgmyuv,pbm,pam,tga,bmp,pnm,xpm,xcf,pcx,tif,tiff,lbm,sfv,txt,"
"sub,idx,srt,cue,ssa",
IGNORE_TEXT, IGNORE_LONGTEXT, false )
add_bool( "show-hiddenfiles", false,
SHOW_HIDDENFILES_TEXT, SHOW_HIDDENFILES_LONGTEXT, false )
set_subcategory( SUBCAT_PLAYLIST_SD )
add_string( "services-discovery", "", SD_TEXT, SD_LONGTEXT, true )
change_short('S')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment