Wishlist TV: fix episode cast 404 (season number was undefined in URL)
query_wishlist episodes carry episode_number but not season_number (it lives on the season), so the guest-cast fetch hit /episode/<tmdb>/undefined/<ep> -> 404 and the S·E eyebrow read 'S undefined'. findEpisode now stamps season_number onto the selected episode.
This commit is contained in:
parent
7ef794fe74
commit
efcaea314c
1 changed files with 3 additions and 1 deletions
|
|
@ -133,7 +133,9 @@
|
|||
function findEpisode(tmdb, sNum, eNum) {
|
||||
var sh = state.showData[tmdb], ep = null;
|
||||
if (sh) (sh.seasons || []).forEach(function (se) {
|
||||
if (se.season_number === sNum) (se.episodes || []).forEach(function (x) { if (x.episode_number === eNum) ep = x; });
|
||||
if (se.season_number === sNum) (se.episodes || []).forEach(function (x) {
|
||||
if (x.episode_number === eNum) { ep = x; ep.season_number = sNum; } // episodes don't carry their season #
|
||||
});
|
||||
});
|
||||
return ep;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue