Skip to content
Snippets Groups Projects
Commit 693b5017 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Storages: Check mrl format before saving

(cherry picked from commit 338810a0)
parent 664cbb6a
No related branches found
No related tags found
No related merge requests found
......@@ -89,18 +89,17 @@ class StorageBrowserAdapter extends BaseBrowserAdapter {
}
void updateMediaDirs() {
if (mMediaDirsLocation != null)
mMediaDirsLocation.clear();
String folders[] = VLCApplication.getMLInstance().getFoldersList();
if (mMediaDirsLocation != null) mMediaDirsLocation.clear();
final String folders[] = VLCApplication.getMLInstance().getFoldersList();
mMediaDirsLocation = new ArrayList<>(folders.length);
for (String folder : folders) {
mMediaDirsLocation.add(folder.substring(7));
mMediaDirsLocation.add(folder.startsWith("file://") ? folder.substring(7) : folder);
}
mCustomDirsLocation = new ArrayList<>(Arrays.asList(CustomDirectories.getCustomDirectories()));
}
protected void checkBoxAction(View v, String mrl) {
ThreeStatesCheckbox tscb = (ThreeStatesCheckbox) v;
final ThreeStatesCheckbox tscb = (ThreeStatesCheckbox) v;
int state = tscb.getState();
if (state == ThreeStatesCheckbox.STATE_CHECKED)
MedialibraryUtils.addDir(mrl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment