* handle folders that contain a movie.nfo files same as diskfolders => rename/move the whole folder
This commit is contained in:
parent
4e610cfbcf
commit
6579d8ce1d
|
@ -517,8 +517,14 @@ public class MediaBindingBean {
|
|||
// make sure media file is defined
|
||||
checkMediaFile();
|
||||
|
||||
if (SUBTITLE_FILES.accept(mediaFile) || NFO_FILES.accept(mediaFile)) {
|
||||
// file is a subtitle
|
||||
if (mediaFile.isDirectory()) {
|
||||
// just select the first video file in the folder as media sample
|
||||
SortedSet<File> videos = new TreeSet<File>(filter(listFiles(singleton(mediaFile), 2, false), VIDEO_FILES));
|
||||
if (videos.size() > 0) {
|
||||
return videos.iterator().next();
|
||||
}
|
||||
} else if (!VIDEO_FILES.accept(mediaFile)) {
|
||||
// file is a subtitle, or nfo, etc
|
||||
String baseName = stripReleaseInfo(FileUtilities.getName(mediaFile)).toLowerCase();
|
||||
|
||||
// find corresponding movie file
|
||||
|
@ -527,12 +533,6 @@ public class MediaBindingBean {
|
|||
return movieFile;
|
||||
}
|
||||
}
|
||||
} else if (mediaFile.isDirectory()) {
|
||||
// just select the first video file in the folder as media sample
|
||||
SortedSet<File> videos = new TreeSet<File>(filter(listFiles(singleton(mediaFile), 2, false), VIDEO_FILES));
|
||||
if (videos.size() > 0) {
|
||||
return videos.iterator().next();
|
||||
}
|
||||
}
|
||||
|
||||
return mediaFile;
|
||||
|
|
|
@ -20,4 +20,4 @@ url.movie-list: http://filebot.sourceforge.net/data/movies.txt.gz
|
|||
url.series-list: http://filebot.sourceforge.net/data/series.list.gz
|
||||
|
||||
# disk folder matcher
|
||||
pattern.diskfolder.entry: ^BDMV$|^HVDVD_TS$|^VIDEO_TS$|^AUDIO_TS$|^VCD$
|
||||
pattern.diskfolder.entry: ^BDMV$|^HVDVD_TS$|^VIDEO_TS$|^AUDIO_TS$|^VCD$|^movie.nfo$
|
||||
|
|
Loading…
Reference in New Issue