* special handling for disk folders
This commit is contained in:
parent
5a6a5dcdd0
commit
07f44e13c9
|
@ -5,19 +5,19 @@ pattern.video.source: CAMRip|CAM|PDVD|TS|TELESYNC|PDVD|PPV|PPVRip|Screener|SCR|S
|
|||
pattern.video.format: DivX|Xvid|AVC|x264|h264|3ivx|mpeg|mpeg4|mp3|aac|ac3|2ch|6ch|WS|HR|720p|1080p|NTSC
|
||||
|
||||
# known release group names
|
||||
url.release-groups: http://filebot.sourceforge.net/data/release-groups.txt
|
||||
url.release-groups: file:///d:/Development/eclipse/filebot/website/data/release-groups.txt
|
||||
|
||||
# blacklisted terms that will be ignored
|
||||
url.query-blacklist: http://filebot.sourceforge.net/data/query-blacklist.txt
|
||||
url.query-blacklist: file:///d:/Development/eclipse/filebot/website/data/query-blacklist.txt
|
||||
|
||||
# clutter files that will be ignored
|
||||
url.exclude-blacklist: http://filebot.sourceforge.net/data/exclude-blacklist.txt
|
||||
url.exclude-blacklist: file:///d:/Development/eclipse/filebot/website/data/exclude-blacklist.txt
|
||||
|
||||
# list of all movies (id, name, year)
|
||||
url.movie-list: http://filebot.sourceforge.net/data/movies.txt.gz
|
||||
url.movie-list: file:///d:/Development/eclipse/filebot/website/data/movies.txt.gz
|
||||
|
||||
# list of tv show and anime names
|
||||
url.series-list: http://filebot.sourceforge.net/data/series.list.gz
|
||||
url.series-list: file:///d:/Development/eclipse/filebot/website/data/series.list.gz
|
||||
|
||||
# disk folder matcher
|
||||
pattern.diskfolder.entry: ^BDMV$|^HVDVD_TS$|^VIDEO_TS$|^AUDIO_TS$|^VCD$|^movie.nfo$
|
||||
|
|
|
@ -114,6 +114,10 @@ class MovieHashMatcher implements AutoCompleteMatcher {
|
|||
for (File dir : mapByFolder(movieFiles).keySet()) {
|
||||
addAll(effectiveNfoFileSet, dir.listFiles(NFO_FILES));
|
||||
}
|
||||
for (File dir : filter(fileset, FOLDERS)) {
|
||||
addAll(effectiveNfoFileSet, dir.listFiles(NFO_FILES));
|
||||
}
|
||||
|
||||
for (File nfo : effectiveNfoFileSet) {
|
||||
try {
|
||||
Movie movie = grepMovie(nfo, service, locale);
|
||||
|
@ -127,6 +131,14 @@ class MovieHashMatcher implements AutoCompleteMatcher {
|
|||
movieByFile.put(nfo, movie);
|
||||
}
|
||||
|
||||
if (isDiskFolder(nfo.getParentFile())) {
|
||||
// special handling for disk folders
|
||||
for (File folder : fileset) {
|
||||
if (nfo.getParentFile().equals(folder)) {
|
||||
movieByFile.put(folder, movie);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// match movie info to movie files that match the nfo file name
|
||||
SortedSet<File> siblingMovieFiles = new TreeSet<File>(filter(movieFiles, new ParentFilter(nfo.getParentFile())));
|
||||
String baseName = stripReleaseInfo(getName(nfo)).toLowerCase();
|
||||
|
@ -136,6 +148,7 @@ class MovieHashMatcher implements AutoCompleteMatcher {
|
|||
movieByFile.put(movieFile, movie);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (NoSuchElementException e) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.WARNING, "Failed to grep IMDbID: " + nfo.getName());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue