From 04ac7f934e7d163756eeeebcf8e539feec6521ce Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 16 Oct 2009 22:00:18 +0000 Subject: [PATCH] * fixed caching bug --- .../net/sourceforge/filebot/web/Episode.java | 18 ++++++++++++++++++ .../sourceforge/filebot/web/TheTVDBClient.java | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/web/Episode.java b/source/net/sourceforge/filebot/web/Episode.java index d12fa0e3..9568c30f 100644 --- a/source/net/sourceforge/filebot/web/Episode.java +++ b/source/net/sourceforge/filebot/web/Episode.java @@ -32,11 +32,29 @@ public class Episode implements Serializable { } + public Integer getEpisodeNumber() { + try { + return new Integer(episode); + } catch (NumberFormatException e) { + return null; + } + } + + public String getSeason() { return season; } + public Integer getSeasonNumber() { + try { + return new Integer(season); + } catch (NumberFormatException e) { + return null; + } + } + + public String getSeriesName() { return seriesName; } diff --git a/source/net/sourceforge/filebot/web/TheTVDBClient.java b/source/net/sourceforge/filebot/web/TheTVDBClient.java index 08839f9a..2e15b64e 100644 --- a/source/net/sourceforge/filebot/web/TheTVDBClient.java +++ b/source/net/sourceforge/filebot/web/TheTVDBClient.java @@ -339,7 +339,7 @@ public class TheTVDBClient implements EpisodeListProvider { public void putEpisodeList(int seriesId, Locale language, List episodes) { - cache.put(new Element(key(host, seriesId, language, "EpisodeList"), episodes)); + cache.put(new Element(key(host, seriesId, language.getLanguage(), "EpisodeList"), episodes)); }