Skip to content

Commit

Permalink
fix: only iterate tmdb movies for images once
Browse files Browse the repository at this point in the history
- Only iterate tmdb movies for images once when getting all images for a shoko series.
  • Loading branch information
revam committed Oct 1, 2024
1 parent 5b40055 commit 3e0a820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shoko.Server/Models/SVR_AnimeSeries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public IReadOnlyList<IImageMetadata> GetImages(ImageEntityType? entityType = nul
}
foreach (var xref in TmdbShowCrossReferences)
images.AddRange(xref.GetImages(entityType, preferredImages));
foreach (var xref in TmdbMovieCrossReferences)
foreach (var xref in TmdbMovieCrossReferences.DistinctBy(xref => xref.TmdbMovieID))
images.AddRange(xref.GetImages(entityType, preferredImages));
foreach (var tvdbShow in TvDBSeries)
images.AddRange(tvdbShow.GetImages(entityType, preferredImages));
Expand Down

0 comments on commit 3e0a820

Please sign in to comment.