fix: tmdb fetching when cache is empty

Redis fails if no values are sent.
This commit is contained in:
Roardom
2025-06-09 00:40:37 +00:00
parent 7dbcfc59b2
commit b67b8b2cf6
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -129,7 +129,9 @@ class ProcessMovieJob implements ShouldQueue
TmdbPerson::upsert($people, 'id');
cache()->put($cache, 8 * 3600);
if ($cache !== []) {
cache()->put($cache, 8 * 3600);
}
TmdbCredit::where('tmdb_movie_id', '=', $this->id)->delete();
TmdbCredit::upsert($credits, ['tmdb_person_id', 'tmdb_movie_id', 'tmdb_tv_id', 'occupation_id', 'character']);
+3 -1
View File
@@ -147,7 +147,9 @@ class ProcessTvJob implements ShouldQueue
TmdbPerson::upsert($people, 'id');
cache()->put($cache, 8 * 3600);
if ($cache !== []) {
cache()->put($cache, 8 * 3600);
}
TmdbCredit::where('tmdb_tv_id', '=', $this->id)->delete();
TmdbCredit::upsert($credits, ['tmdb_person_id', 'tmdb_movie_id', 'tmdb_tv_id', 'occupation_id', 'character']);