mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 16:28:51 -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:
parent
024ea14326
commit
41264f0045
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user