diff --git a/Shoko.Server/Providers/TMDB/TmdbMetadataService.cs b/Shoko.Server/Providers/TMDB/TmdbMetadataService.cs index 34d45d6d6..c1223e89f 100644 --- a/Shoko.Server/Providers/TMDB/TmdbMetadataService.cs +++ b/Shoko.Server/Providers/TMDB/TmdbMetadataService.cs @@ -1931,7 +1931,8 @@ private void PurgeTitlesAndOverviews(ForeignEntityType foreignType, int foreignI private async Task UpdateCompanies(IEntityMetadata tmdbEntity, List companies) { var existingXrefs = _xrefTmdbCompanyEntity.GetByTmdbEntityTypeAndID(tmdbEntity.Type, tmdbEntity.Id) - .ToDictionary(xref => xref.TmdbCompanyID); + .GroupBy(xref => xref.TmdbCompanyID) + .ToDictionary(xref => xref.Key, groupBy => groupBy.ToList()); var xrefsToAdd = 0; var xrefsToSkip = new HashSet(); var xrefsToSave = new List(); @@ -1939,8 +1940,9 @@ private async Task UpdateCompanies(IEntityMetadata tmdbEntity, List UpdateCompanies(IEntityMetadata tmdbEntity, List xrefs) .ExceptBy(xrefsToSkip, o => o.TMDB_Company_EntityID) .ToList();