Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-Android
Commits
e33f84f4
Commit
e33f84f4
authored
Jul 04, 2012
by
Jean-Baptiste Kempf
Browse files
Split the main constants for extensions too
parent
6057de71
Changes
2
Hide whitespace changes
Inline
Side-by-side
vlc-android/src/org/videolan/vlc/Media.java
View file @
e33f84f4
...
...
@@ -30,7 +30,8 @@ public class Media implements Comparable<Media> {
public
final
static
String
TAG
=
"VLC/MediaItem"
;
public
final
static
HashSet
<
String
>
EXTENSIONS
;
public
final
static
HashSet
<
String
>
VIDEO_EXTENSIONS
;
public
final
static
HashSet
<
String
>
AUDIO_EXTENSIONS
;
public
final
static
String
EXTENSIONS_REGEX
;
public
final
static
HashSet
<
String
>
FOLDER_BLACKLIST
;
...
...
@@ -60,11 +61,12 @@ public class Media implements Comparable<Media> {
"/media/audio/ringtones"
,
"/Android/data/"
};
EXTENSIONS
=
new
HashSet
<
String
>();
VIDEO_
EXTENSIONS
=
new
HashSet
<
String
>();
for
(
String
item
:
video_extensions
)
EXTENSIONS
.
add
(
item
);
VIDEO_EXTENSIONS
.
add
(
item
);
AUDIO_EXTENSIONS
=
new
HashSet
<
String
>();
for
(
String
item
:
audio_extensions
)
EXTENSIONS
.
add
(
item
);
AUDIO_
EXTENSIONS
.
add
(
item
);
StringBuilder
sb
=
new
StringBuilder
(
115
);
sb
.
append
(
".+(\\.)((?i)("
);
...
...
vlc-android/src/org/videolan/vlc/MediaLibrary.java
View file @
e33f84f4
...
...
@@ -283,7 +283,8 @@ public class MediaLibrary {
int
dotIndex
=
fileName
.
lastIndexOf
(
"."
);
if
(
dotIndex
!=
-
1
)
{
String
fileExt
=
fileName
.
substring
(
dotIndex
);
accepted
=
Media
.
EXTENSIONS
.
contains
(
fileExt
);
accepted
=
Media
.
AUDIO_EXTENSIONS
.
contains
(
fileExt
)
||
Media
.
VIDEO_EXTENSIONS
.
contains
(
fileExt
);
}
}
}
...
...
Write
Preview
Supports
Markdown
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