From fae5ba713198e1801176b20b9d3f8bbd175c7918 Mon Sep 17 00:00:00 2001 From: "Luis F. Chiroque" Date: Mon, 30 Nov 2015 14:21:57 +0100 Subject: [PATCH] VideoPost's thumbnail (width & height) set to zero wherein JSON is 'false' (Boolean). --- src/main/java/com/tumblr/jumblr/types/VideoPost.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/tumblr/jumblr/types/VideoPost.java b/src/main/java/com/tumblr/jumblr/types/VideoPost.java index f37186d..c6ba764 100644 --- a/src/main/java/com/tumblr/jumblr/types/VideoPost.java +++ b/src/main/java/com/tumblr/jumblr/types/VideoPost.java @@ -15,8 +15,8 @@ public class VideoPost extends Post { private String embed, permalink_url; private File data; private String thumbnail_url; - private int thumbnail_width; - private int thumbnail_height; + private Object thumbnail_width; + private Object thumbnail_height; /** * Get the permalink URL for this video @@ -38,7 +38,7 @@ public String getThumbnailUrl() { * @return 0 if not set */ public int getThumbnailWidth() { - return thumbnail_width; + return (thumbnail_width instanceof Boolean)? 0: (int)Double.parseDouble(thumbnail_width.toString()); } /** @@ -46,7 +46,7 @@ public int getThumbnailWidth() { * @return 0 if not set */ public int getThumbnailHeight() { - return thumbnail_height; + return (thumbnail_height instanceof Boolean)? 0: (int)Double.parseDouble(thumbnail_height.toString()); } /**