fix: incorrect air date on movies, severance returning 500 from 0 episodes in new season

This commit is contained in:
2025-09-09 11:13:42 -05:00
parent d63d477ed1
commit e9edd6a35a
4 changed files with 8 additions and 8 deletions

View File

@@ -143,13 +143,13 @@ class TmdbClient
{
$tmdbId = $this->findByImdbId($imdbId)['id'];
$media = $this->tvRepository->getApi()->getTvShow($tmdbId, ['append_to_response' => 'external_ids,credits']);
$media['seasons'] = Map::from($media['seasons'])->filter(function ($data) {
return $data['season_number'] !== 0 &&
strtolower($data['name']) !== 'specials';
strtolower($data['name']) !== 'specials' &&
$data['episode_count'] > 0;
})->map(function ($data) use ($media) {
return $this->tvSeasonDetails($media['id'], $data['season_number'])['episodes'];
})->rekey(function ($data) {
return $data[1]['season_number'];
})->toArray();
return $this->parseResult(