mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 00:38:52 -05:00
Fix TheTVDB artwork rating issues
This commit is contained in:
parent
f5304a93d4
commit
ef14db36cb
@ -251,7 +251,7 @@ public class TheTVDBClient extends AbstractEpisodeListProvider implements Artwor
|
|||||||
String subKey = getString(it, "subKey");
|
String subKey = getString(it, "subKey");
|
||||||
String fileName = getString(it, "fileName");
|
String fileName = getString(it, "fileName");
|
||||||
String resolution = getString(it, "resolution");
|
String resolution = getString(it, "resolution");
|
||||||
Double rating = getDecimal(getString(it, "ratingsInfo"), "average");
|
Double rating = getDecimal(getMap(it, "ratingsInfo"), "average");
|
||||||
|
|
||||||
return new Artwork(this, Stream.of(category, subKey, resolution), resolveBanner(fileName), locale, rating);
|
return new Artwork(this, Stream.of(category, subKey, resolution), resolveBanner(fileName), locale, rating);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -140,13 +140,14 @@ public class TheTVDBClientTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getImages() throws Exception {
|
public void getArtwork() throws Exception {
|
||||||
Artwork i = thetvdb.getArtwork(buffy.getId(), "fanart", Locale.ENGLISH).get(0);
|
Artwork i = thetvdb.getArtwork(buffy.getId(), "fanart", Locale.ENGLISH).get(0);
|
||||||
|
|
||||||
assertEquals("[fanart, 1280x720]", i.getTags().toString());
|
assertEquals("[fanart, 1920x1080]", i.getTags().toString());
|
||||||
assertEquals("http://thetvdb.com/banners/fanart/original/70327-1.jpg", i.getUrl().toString());
|
assertEquals("http://thetvdb.com/banners/fanart/original/70327-7.jpg", i.getUrl().toString());
|
||||||
assertTrue(i.matches("fanart", "1280x720"));
|
assertTrue(i.matches("fanart", "1920x1080"));
|
||||||
assertFalse(i.matches("fanart", "1280x720", "1"));
|
assertFalse(i.matches("fanart", "1920x1080", "1"));
|
||||||
|
assertEquals(8.0, i.getRating(), 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user