Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
fb5f5d1f
Commit
fb5f5d1f
authored
May 07, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux/directory: add show-hiddenfiles option
False by default, i.e. we don't show hidden files by default.
parent
353f77fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
modules/demux/playlist/directory.c
modules/demux/playlist/directory.c
+6
-2
modules/demux/playlist/playlist.c
modules/demux/playlist/playlist.c
+6
-0
No files found.
modules/demux/playlist/directory.c
View file @
fb5f5d1f
...
...
@@ -149,19 +149,23 @@ static int Demux( demux_t *p_demux )
input_item_node_t
*
p_node
;
input_item_t
*
p_item
;
char
*
psz_ignored_exts
;
bool
b_show_hiddenfiles
;
p_input
=
GetCurrentItem
(
p_demux
);
p_node
=
input_item_node_Create
(
p_input
);
input_item_Release
(
p_input
);
b_show_hiddenfiles
=
var_InheritBool
(
p_demux
,
"show-hiddenfiles"
);
psz_ignored_exts
=
var_InheritString
(
p_demux
,
"ignore-filetypes"
);
while
(
!
i_ret
&&
(
p_item
=
stream_ReadDir
(
p_demux
->
s
)
)
)
{
int
i_name_len
=
p_item
->
psz_name
?
strlen
(
p_item
->
psz_name
)
:
0
;
/* skip "." and ".." items */
if
(
(
i_name_len
==
1
&&
p_item
->
psz_name
[
0
]
==
'.'
)
||
/* skip "." and ".." and hidden files if option is activated */
if
(
(
!
b_show_hiddenfiles
&&
i_name_len
>
0
&&
p_item
->
psz_name
[
0
]
==
'.'
)
||
(
i_name_len
==
1
&&
p_item
->
psz_name
[
0
]
==
'.'
)
||
(
i_name_len
==
2
&&
p_item
->
psz_name
[
0
]
==
'.'
&&
p_item
->
psz_name
[
1
]
==
'.'
)
||
has_ext
(
psz_ignored_exts
,
p_item
->
psz_name
))
...
...
modules/demux/playlist/playlist.c
View file @
fb5f5d1f
...
...
@@ -68,6 +68,10 @@ static const char *const psz_sort_list_text[] = {
"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
()
add_shortcut
(
"playlist"
)
set_category
(
CAT_INPUT
)
...
...
@@ -166,6 +170,8 @@ vlc_module_begin ()
IGNORE_TEXT
,
IGNORE_LONGTEXT
,
false
)
add_string
(
"directory-sort"
,
"collate"
,
SORT_TEXT
,
SORT_LONGTEXT
,
false
)
change_string_list
(
psz_sort_list
,
psz_sort_list_text
)
add_bool
(
"show-hiddenfiles"
,
false
,
SHOW_HIDDENFILES_TEXT
,
SHOW_HIDDENFILES_LONGTEXT
,
false
)
vlc_module_end
()
int
Control
(
demux_t
*
demux
,
int
query
,
va_list
args
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment