* OpenSubtitle Movie results are always displayed in Name (Year) format while TV Series results are displayed in plain Name format
This commit is contained in:
parent
b271afbad2
commit
ebac5709ee
|
@ -152,11 +152,7 @@ public class SubtitlePanel extends AbstractSearchPanel<SubtitleProvider, Subtitl
|
|||
protected Collection<String> getHistory(SubtitleProvider engine) throws Exception {
|
||||
List<String> names = new ArrayList<String>();
|
||||
for (SubtitleSearchResult it : MediaDetection.releaseInfo.getOpenSubtitlesIndex()) {
|
||||
if (it.isMovie()) {
|
||||
names.add(it.getNameWithYear());
|
||||
} else if (it.isSeries()) {
|
||||
names.add(it.getName());
|
||||
}
|
||||
names.addAll(it.getEffectiveNames());
|
||||
}
|
||||
return names;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package net.filebot.web;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class SubtitleSearchResult extends Movie {
|
||||
|
@ -49,4 +50,24 @@ public class SubtitleSearchResult extends Movie {
|
|||
return kind == Kind.Series;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getEffectiveNames() {
|
||||
switch (kind) {
|
||||
case Series:
|
||||
return super.getEffectiveNamesWithoutYear();
|
||||
default:
|
||||
return super.getEffectiveNames(); // with year
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
switch (kind) {
|
||||
case Series:
|
||||
return super.getName(); // without year
|
||||
default:
|
||||
return super.toString(); // with year
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue