Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
529
Issue boards
Milestones
Wiki
Code
Merge requests
15
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
e68a511d
Commit
e68a511d
authored
5 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Filter storage detection on specific devices only
(cherry picked from commit
db4863b0
)
parent
b1749ced
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#6956
failed with stage
Stage:
in 3 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/util/Kextensions.kt
+3
-2
3 additions, 2 deletions
vlc-android/src/org/videolan/vlc/util/Kextensions.kt
with
3 additions
and
2 deletions
vlc-android/src/org/videolan/vlc/util/Kextensions.kt
+
3
−
2
View file @
e68a511d
...
...
@@ -135,11 +135,12 @@ fun MutableList<MediaWrapper>.updateWithMLMeta() : MutableList<MediaWrapper> {
return
this
}
@ExperimentalCoroutinesApi
@ObsoleteCoroutinesApi
suspend
fun
String
.
scanAllowed
()
=
withContext
(
Dispatchers
.
IO
)
{
val
file
=
File
(
Uri
.
parse
(
this
@scanAllowed
).
path
)
if
(!
file
.
exists
()
||
!
file
.
canRead
())
return
@withContext
false
val
children
=
file
.
list
()
?:
return
@withContext
true
for
(
child
in
children
)
if
(
child
==
".nomedia"
)
return
@withContext
false
if
(
AndroidDevices
.
watchDevices
&&
file
.
list
()
?.
any
{
it
==
".nomedia"
}
==
true
)
return
@withContext
false
true
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment