1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-16 14:25:02 -05:00

* grab series name from folder in obvious cases of folder-per-episode naming schemes

@see
http://forum.xbmc.org/showthread.php?tid=110302&pid=1393844#pid1393844
This commit is contained in:
Reinhard Pointner 2013-04-12 20:36:54 +00:00
parent 024ea14326
commit 41264f0045

View File

@ -327,7 +327,20 @@ public class MediaDetection {
}
// match common word sequence and clean detected word sequence from unwanted elements
Collection<String> matches = new SeriesNameMatcher(locale).matchAll(files.toArray(new File[files.size()]));
Collection<String> matches = new LinkedHashSet<String>();
// check CWS matches
SeriesNameMatcher snm = new SeriesNameMatcher(locale);
matches.addAll(snm.matchAll(files.toArray(new File[files.size()])));
// check for known pattern matches
for (File f : files) {
String sn = snm.matchByEpisodeIdentifier(getName(f.getParentFile()));
if (sn != null) {
matches.add(sn);
}
}
try {
matches = stripReleaseInfo(matches, true);
} catch (Exception e) {