* merge specials into first SxE group

This commit is contained in:
Reinhard Pointner 2012-10-15 14:40:44 +00:00
parent c60ce414f9
commit e9cada4393
1 changed files with 11 additions and 7 deletions

View File

@ -166,7 +166,12 @@ public class MediaDetection {
Map<Object, List<File>> filesByEpisode = new LinkedHashMap<Object, List<File>>();
for (File file : combinedFileSet) {
Object eid = getEpisodeIdentifier(file.getName(), true);
if (eid != null) {
// merge specials into first SxE group
if (eid == null) {
eid = file; // open new SxE group for each unrecognized file
}
List<File> episodeFiles = filesByEpisode.get(eid);
if (episodeFiles == null) {
episodeFiles = new ArrayList<File>();
@ -174,7 +179,6 @@ public class MediaDetection {
}
episodeFiles.add(file);
}
}
for (int i = 0; true; i++) {
Set<File> series = new LinkedHashSet<File>();