* merge specials into first SxE group
This commit is contained in:
parent
c60ce414f9
commit
e9cada4393
|
@ -166,14 +166,18 @@ public class MediaDetection {
|
||||||
Map<Object, List<File>> filesByEpisode = new LinkedHashMap<Object, List<File>>();
|
Map<Object, List<File>> filesByEpisode = new LinkedHashMap<Object, List<File>>();
|
||||||
for (File file : combinedFileSet) {
|
for (File file : combinedFileSet) {
|
||||||
Object eid = getEpisodeIdentifier(file.getName(), true);
|
Object eid = getEpisodeIdentifier(file.getName(), true);
|
||||||
if (eid != null) {
|
|
||||||
List<File> episodeFiles = filesByEpisode.get(eid);
|
// merge specials into first SxE group
|
||||||
if (episodeFiles == null) {
|
if (eid == null) {
|
||||||
episodeFiles = new ArrayList<File>();
|
eid = file; // open new SxE group for each unrecognized file
|
||||||
filesByEpisode.put(eid, episodeFiles);
|
|
||||||
}
|
|
||||||
episodeFiles.add(file);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<File> episodeFiles = filesByEpisode.get(eid);
|
||||||
|
if (episodeFiles == null) {
|
||||||
|
episodeFiles = new ArrayList<File>();
|
||||||
|
filesByEpisode.put(eid, episodeFiles);
|
||||||
|
}
|
||||||
|
episodeFiles.add(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; true; i++) {
|
for (int i = 0; true; i++) {
|
||||||
|
|
Loading…
Reference in New Issue