From d00ae0127e558221c0da0ce49a491acbec2abd30 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 4 Nov 2015 09:10:16 +0000 Subject: [PATCH] * fix parsing issues --- source/net/filebot/web/TVMazeClient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/net/filebot/web/TVMazeClient.java b/source/net/filebot/web/TVMazeClient.java index a7e60b92..e65afc57 100644 --- a/source/net/filebot/web/TVMazeClient.java +++ b/source/net/filebot/web/TVMazeClient.java @@ -84,8 +84,8 @@ public class TVMazeClient extends AbstractEpisodeListProvider { JsonObject response = request("shows/" + show.getId()); String status = (String) response.get("status"); - String runtime = response.get("runtime").toString(); String premiered = (String) response.get("premiered"); + String runtime = response.get("runtime").toString(); JsonObject genres = (JsonObject) response.get("genres"); JsonObject rating = (JsonObject) response.get("rating"); @@ -99,8 +99,8 @@ public class TVMazeClient extends AbstractEpisodeListProvider { if (genres != null && genres.isArray()) { seriesInfo.setGenres(Arrays.stream(genres.getArray()).map(Objects::toString).collect(Collectors.toList())); } - if (rating != null && rating.isMap() && !rating.isEmpty()) { - seriesInfo.setRating(new Double((String) rating.get("average"))); + if (rating != null && !rating.isEmpty()) { + seriesInfo.setRating(new Double(rating.get("average").toString())); } return seriesInfo;