mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-01 16:00:53 -05:00
fix: tmdb fetching when cache is empty
Redis fails if no values are sent.
This commit is contained in:
@@ -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']);
|
||||
|
||||
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user