Skip to content

Commit 76af481

Browse files
committed
fix: skip show id 0
1 parent 7b98e38 commit 76af481

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Shoko.Server/Providers/TMDB/TmdbMetadataService.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,9 @@ public async Task UpdateAllShows(bool force = false, bool downloadImages = false
999999
var scheduler = await _schedulerFactory.GetScheduler();
10001000
foreach (var xref in allXRefs)
10011001
{
1002+
if (xref.TmdbShowID is 0)
1003+
continue;
1004+
10021005
if (xref.AnimeSeries is null)
10031006
continue;
10041007

@@ -1024,6 +1027,9 @@ public Task<bool> WaitForShowUpdateAsync(int showId)
10241027

10251028
public async Task ScheduleUpdateOfShow(int showId, bool forceRefresh = false, bool downloadImages = false, bool? downloadCrewAndCast = null, bool? downloadAlternateOrdering = null)
10261029
{
1030+
if (showId is 0)
1031+
return;
1032+
10271033
// Schedule the show info to be downloaded or updated.
10281034
await (await _schedulerFactory.GetScheduler().ConfigureAwait(false)).StartJob<UpdateTmdbShowJob>(c =>
10291035
{
@@ -1037,6 +1043,9 @@ public async Task ScheduleUpdateOfShow(int showId, bool forceRefresh = false, bo
10371043

10381044
public async Task<bool> UpdateShow(int showId, bool forceRefresh = false, bool downloadImages = false, bool downloadCrewAndCast = false, bool downloadAlternateOrdering = false, bool quickRefresh = false)
10391045
{
1046+
if (showId is 0)
1047+
return false;
1048+
10401049
using (await GetLockForEntity(ForeignEntityType.Show, showId, "metadata", "Update").ConfigureAwait(false))
10411050
{
10421051
// Abort if we're within a certain time frame as to not try and get us rate-limited.

0 commit comments

Comments
 (0)