mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 16:28:51 -05:00
* refactoring
This commit is contained in:
parent
5647aa962e
commit
e0bb32cbd0
@ -202,25 +202,22 @@ public class ReleaseInfo {
|
||||
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
|
||||
for (File root : getMediaRoots()) {
|
||||
if (root.isDirectory()) {
|
||||
volumes.addAll(getChildren(root, FOLDERS));
|
||||
for (File mediaRoot : getMediaRoots()) {
|
||||
volumes.addAll(getChildren(mediaRoot, 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);
|
||||
}
|
||||
System.out.println(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
|
||||
|
||||
# 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