1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-22 07:48:52 -05:00

Refactor AnimeList client

This commit is contained in:
Reinhard Pointner 2019-06-11 02:13:02 +07:00
parent 9d0f7c9220
commit 032bfd4650

View File

@ -213,8 +213,12 @@ public class AnimeLists implements Datasource {
} }
} }
public Cache getCache() {
return Cache.getCache(getIdentifier(), CacheType.Monthly);
}
public Model getModel() throws Exception { public Model getModel() throws Exception {
return Cache.getCache(getIdentifier(), CacheType.Monthly).bytes("https://github.com/ScudLee/anime-lists/raw/master/anime-list.xml", URL::new).transform(bytes -> { return getCache().bytes("https://github.com/ScudLee/anime-lists/raw/master/anime-list.xml", URL::new).transform(bytes -> {
return unmarshal(bytes, Model.class); return unmarshal(bytes, Model.class);
}).get(); }).get();
} }