* 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
|
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
|
# 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
|
# 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
|
# 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)
|
# 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
|
# 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
|
# disk folder matcher
|
||||||
pattern.diskfolder.entry: ^BDMV$|^HVDVD_TS$|^VIDEO_TS$|^AUDIO_TS$|^VCD$|^movie.nfo$
|
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()) {
|
for (File dir : mapByFolder(movieFiles).keySet()) {
|
||||||
addAll(effectiveNfoFileSet, dir.listFiles(NFO_FILES));
|
addAll(effectiveNfoFileSet, dir.listFiles(NFO_FILES));
|
||||||
}
|
}
|
||||||
|
for (File dir : filter(fileset, FOLDERS)) {
|
||||||
|
addAll(effectiveNfoFileSet, dir.listFiles(NFO_FILES));
|
||||||
|
}
|
||||||
|
|
||||||
for (File nfo : effectiveNfoFileSet) {
|
for (File nfo : effectiveNfoFileSet) {
|
||||||
try {
|
try {
|
||||||
Movie movie = grepMovie(nfo, service, locale);
|
Movie movie = grepMovie(nfo, service, locale);
|
||||||
|
@ -127,13 +131,22 @@ class MovieHashMatcher implements AutoCompleteMatcher {
|
||||||
movieByFile.put(nfo, movie);
|
movieByFile.put(nfo, movie);
|
||||||
}
|
}
|
||||||
|
|
||||||
// match movie info to movie files that match the nfo file name
|
if (isDiskFolder(nfo.getParentFile())) {
|
||||||
SortedSet<File> siblingMovieFiles = new TreeSet<File>(filter(movieFiles, new ParentFilter(nfo.getParentFile())));
|
// special handling for disk folders
|
||||||
String baseName = stripReleaseInfo(getName(nfo)).toLowerCase();
|
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();
|
||||||
|
|
||||||
for (File movieFile : siblingMovieFiles) {
|
for (File movieFile : siblingMovieFiles) {
|
||||||
if (stripReleaseInfo(getName(movieFile)).toLowerCase().startsWith(baseName)) {
|
if (stripReleaseInfo(getName(movieFile)).toLowerCase().startsWith(baseName)) {
|
||||||
movieByFile.put(movieFile, movie);
|
movieByFile.put(movieFile, movie);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (NoSuchElementException e) {
|
} catch (NoSuchElementException e) {
|
||||||
|
|
Loading…
Reference in New Issue