api-themoviedb
api-themoviedb copied to clipboard
parameter validation prevents ability to access TV series episodes in season 0.. the "specials"
- where seasonNumber is passed in with value: 0
-
where validation causes this value to be silently ignored
- which causes the URL that makes the API request to be incorrectly formed.. and the service returns a 404
off-hand, a possible workaround could be:
public void add(final Param key, final Integer value) {
int minValue = (key == Param.SEASON_NUMBER) ? 0 : 1;
if (value != null && value >= minValue) {
parameters.put(key, String.valueOf(value));
}
}