diff --git a/src/Tmdb/TmdbClient.php b/src/Tmdb/TmdbClient.php index 945ea51..c80752a 100644 --- a/src/Tmdb/TmdbClient.php +++ b/src/Tmdb/TmdbClient.php @@ -150,6 +150,8 @@ class TmdbClient $data['episode_count'] > 0; })->map(function ($data) use ($media) { return $this->tvSeasonDetails($media['id'], $data['season_number'])['episodes']; + })->rekey(function ($data) use ($media) { + return $data[1]['season_number']; })->toArray(); return $this->parseResult( diff --git a/src/Twig/Components/TvEpisodeList.php b/src/Twig/Components/TvEpisodeList.php index 3fa549d..b7d2772 100644 --- a/src/Twig/Components/TvEpisodeList.php +++ b/src/Twig/Components/TvEpisodeList.php @@ -49,7 +49,6 @@ final class TvEpisodeList } $this->reloadCount++; -// dd(new TvEpisodePaginator()->paginate($results, $this->pageNumber, $this->perPage)); return new TvEpisodePaginator()->paginate($results, $this->pageNumber, $this->perPage); } diff --git a/templates/components/TvEpisodeList.html.twig b/templates/components/TvEpisodeList.html.twig index 6154900..9ee1173 100644 --- a/templates/components/TvEpisodeList.html.twig +++ b/templates/components/TvEpisodeList.html.twig @@ -18,7 +18,7 @@ >
- {% if episode.poster != null %} + {% if "jpg" in episode.poster %} {% else %}