Commit b1ca6e51 authored by Geoffrey Métais's avatar Geoffrey Métais

Accept path parameter for RELOAD call

parent f9e70536
......@@ -115,7 +115,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
setupMedialibrary(intent.getBooleanExtra(StartActivity.EXTRA_UPGRADE, false));
break;
case ACTION_RELOAD:
reload();
reload(intent.getStringExtra(EXTRA_PATH));
break;
case ACTION_DISCOVER:
discover(intent.getStringExtra(EXTRA_PATH));
......@@ -164,10 +164,13 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
}
}
private void reload() {
private void reload(String path) {
if (mReload > 0)
return;
mMedialibrary.reload();
if (TextUtils.isEmpty(path))
mMedialibrary.reload();
else
mMedialibrary.reload(path);
}
private void setupMedialibrary(final boolean upgrade) {
......@@ -206,7 +209,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
if (upgrade) {
mMedialibrary.forceParserRetry();
} else if (!shouldInit)
reload();
reload(null);
}
}
});
......
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