mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-15 22:05:00 -05:00
* forgot about MultiEpisode type Episode objects...
This commit is contained in:
parent
e9cada4393
commit
04b6d25030
@ -231,7 +231,7 @@ class EpisodeListMatcher implements AutoCompleteMatcher {
|
|||||||
for (Future<List<Match<File, ?>>> future : executor.invokeAll(taskPerFolder)) {
|
for (Future<List<Match<File, ?>>> future : executor.invokeAll(taskPerFolder)) {
|
||||||
// make sure each episode has unique object data
|
// make sure each episode has unique object data
|
||||||
for (Match<File, ?> it : future.get()) {
|
for (Match<File, ?> it : future.get()) {
|
||||||
matches.add(new Match<File, Episode>(it.getValue(), new Episode((Episode) it.getCandidate())));
|
matches.add(new Match<File, Episode>(it.getValue(), ((Episode) it.getCandidate()).clone()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ class EpisodeListMatcher implements AutoCompleteMatcher {
|
|||||||
for (File file : derivateFiles) {
|
for (File file : derivateFiles) {
|
||||||
for (Match<File, ?> match : matches) {
|
for (Match<File, ?> match : matches) {
|
||||||
if (file.getParentFile().equals(match.getValue().getParentFile()) && isDerived(file, match.getValue()) && match.getCandidate() instanceof Episode) {
|
if (file.getParentFile().equals(match.getValue().getParentFile()) && isDerived(file, match.getValue()) && match.getCandidate() instanceof Episode) {
|
||||||
derivateMatches.add(new Match<File, Object>(file, new Episode((Episode) match.getCandidate())));
|
derivateMatches.add(new Match<File, Object>(file, ((Episode) match.getCandidate()).clone()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,6 +117,12 @@ public class Episode implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Episode clone() {
|
||||||
|
return new Episode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return EpisodeFormat.SeasonEpisode.format(this);
|
return EpisodeFormat.SeasonEpisode.format(this);
|
||||||
|
@ -38,6 +38,12 @@ public class MultiEpisode extends Episode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MultiEpisode clone() {
|
||||||
|
return new MultiEpisode(this.episodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return EpisodeFormat.SeasonEpisode.formatMultiEpisode(getEpisodes());
|
return EpisodeFormat.SeasonEpisode.formatMultiEpisode(getEpisodes());
|
||||||
|
Loading…
Reference in New Issue
Block a user