* fixed caching bug

This commit is contained in:
Reinhard Pointner 2009-10-16 22:00:18 +00:00
parent 5bb45541a8
commit 04ac7f934e
2 changed files with 19 additions and 1 deletions

View File

@ -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;
}

View File

@ -339,7 +339,7 @@ public class TheTVDBClient implements EpisodeListProvider {
public void putEpisodeList(int seriesId, Locale language, List<Episode> episodes) {
cache.put(new Element(key(host, seriesId, language, "EpisodeList"), episodes));
cache.put(new Element(key(host, seriesId, language.getLanguage(), "EpisodeList"), episodes));
}