mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-21 15:28:52 -05:00
Support for enhanced AnimeList mappings
This commit is contained in:
parent
0e5df2c0c7
commit
52b8e31d53
@ -86,20 +86,10 @@ public class AnimeLists implements Datasource {
|
||||
protected Episode derive(DB db, Entry a, Episode episode, int s, int e) {
|
||||
if (s == 0) {
|
||||
// special
|
||||
switch (db) {
|
||||
case AniDB:
|
||||
return episode.derive(a.name, null, null, null, e);
|
||||
default:
|
||||
return episode.derive(a.tvdbname, null, null, null, e);
|
||||
}
|
||||
return episode.derive(getSeriesName(db, a), null, null, null, e);
|
||||
} else {
|
||||
// regular
|
||||
switch (db) {
|
||||
case AniDB:
|
||||
return episode.derive(a.name, null, e, null, null);
|
||||
default:
|
||||
return episode.derive(a.tvdbname, null, e, null, null);
|
||||
}
|
||||
return episode.derive(getSeriesName(db, a), null, e, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,6 +186,15 @@ public class AnimeLists implements Datasource {
|
||||
}
|
||||
}
|
||||
|
||||
protected String getSeriesName(DB db, Entry a) {
|
||||
switch (db) {
|
||||
case AniDB:
|
||||
return a.name;
|
||||
default:
|
||||
return a.tvdbname;
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isValid(Entry a) {
|
||||
return a.anidbid != null && a.tvdbid != null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user