mirror of
https://github.com/mitb-archive/filebot
synced 2024-08-13 17:03:45 -04:00
* refactoring
This commit is contained in:
parent
5647aa962e
commit
e0bb32cbd0
@ -202,25 +202,22 @@ public class ReleaseInfo {
|
|||||||
volumes.addAll(getChildren(root, FOLDERS));
|
volumes.addAll(getChildren(root, FOLDERS));
|
||||||
}
|
}
|
||||||
|
|
||||||
// add additional user roots if user.home is not set properly
|
|
||||||
String username = System.getProperty("user.name");
|
|
||||||
if (username != null && username.length() > 0) {
|
|
||||||
volumes.add(new File("/Users/" + username));
|
|
||||||
volumes.add(new File("/home/" + username));
|
|
||||||
volumes.add(new File("/media/" + username));
|
|
||||||
}
|
|
||||||
|
|
||||||
// user-specific media roots
|
// user-specific media roots
|
||||||
for (File root : getMediaRoots()) {
|
for (File mediaRoot : getMediaRoots()) {
|
||||||
if (root.isDirectory()) {
|
volumes.addAll(getChildren(mediaRoot, FOLDERS));
|
||||||
volumes.addAll(getChildren(root, FOLDERS));
|
volumes.add(mediaRoot);
|
||||||
|
|
||||||
|
// add additional user roots if user.home is not set properly or listFiles doesn't work
|
||||||
|
String username = System.getProperty("user.name");
|
||||||
|
if (username != null && username.length() > 0) {
|
||||||
|
volumes.add(new File(mediaRoot, username));
|
||||||
}
|
}
|
||||||
volumes.add(root);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
volumeRoots = unmodifiableSet(volumes);
|
volumeRoots = unmodifiableSet(volumes);
|
||||||
}
|
}
|
||||||
|
System.out.println(volumeRoots);
|
||||||
return volumeRoots;
|
return volumeRoots;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,4 +35,4 @@ url.anidb-index: http://app.filebot.net/data/anidb.txt.xz
|
|||||||
pattern.diskfolder.entry: BDMV|HVDVD_TS|VIDEO_TS|AUDIO_TS|VCD|MovieObject.bdmv|VIDEO_TS.VOB|movie.nfo
|
pattern.diskfolder.entry: BDMV|HVDVD_TS|VIDEO_TS|AUDIO_TS|VCD|MovieObject.bdmv|VIDEO_TS.VOB|movie.nfo
|
||||||
|
|
||||||
# media root folders
|
# media root folders
|
||||||
folder.media.roots: /Volumes:/home:/mnt:/media
|
folder.media.roots: /Volumes:/Users:/home:/mnt:/media
|
Loading…
Reference in New Issue
Block a user