Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
Ewout ter Hoeven
VLC-Android
Commits
9771eadf
Commit
9771eadf
authored
Feb 28, 2017
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly handle discovery of one single directory
parent
57f0fd4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
vlc-android/src/org/videolan/vlc/MediaParsingService.java
vlc-android/src/org/videolan/vlc/MediaParsingService.java
+8
-2
No files found.
vlc-android/src/org/videolan/vlc/MediaParsingService.java
View file @
9771eadf
...
...
@@ -43,7 +43,9 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
private
Medialibrary
mMedialibrary
;
private
int
mParsing
=
0
,
mReload
=
0
;
private
String
mCurrentDiscovery
=
null
;
String
mFolderToDiscover
=
null
;
private
long
mLastNotificationTime
=
0L
;
private
BroadcastReceiver
mReceiver
=
new
BroadcastReceiver
()
{
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
...
...
@@ -93,6 +95,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
}
private
void
discover
(
String
path
)
{
mFolderToDiscover
=
""
;
mMedialibrary
.
discover
(
path
);
}
...
...
@@ -201,7 +204,10 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
}
@Override
public
void
onDiscoveryStarted
(
String
entryPoint
)
{}
public
void
onDiscoveryStarted
(
String
entryPoint
)
{
if
(
mFolderToDiscover
!=
null
&&
mFolderToDiscover
.
isEmpty
())
mFolderToDiscover
=
entryPoint
;
}
@Override
public
void
onDiscoveryProgress
(
String
entryPoint
)
{
...
...
@@ -212,7 +218,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
@Override
public
void
onDiscoveryCompleted
(
String
entryPoint
)
{
if
(
mCurrentDiscovery
!=
null
&&
mParsing
==
0
&&
entryPoint
.
isEmpty
(
))
if
(
(
mParsing
==
0
&&
mCurrentDiscovery
!=
null
&&
entryPoint
.
isEmpty
())
||
TextUtils
.
equals
(
mFolderToDiscover
,
entryPoint
))
stopSelf
();
}
...
...
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