PDF Metadata Support (#3552)

Co-authored-by: Matthias Neeracher <microtherion@gmail.com>
This commit is contained in:
Joe Milazzo 2025-02-16 15:10:15 -06:00 committed by GitHub
parent 56108eb373
commit f76de42b28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 1949 additions and 57 deletions

View file

@ -566,7 +566,6 @@ public class ExternalMetadataService : IExternalMetadataService
return false;
}
var relatedSeriesDict = new Dictionary<int, Series>();
foreach (var relation in externalMetadataRelations)
{
var names = new [] {relation.SeriesName.PreferredTitle, relation.SeriesName.RomajiTitle, relation.SeriesName.EnglishTitle, relation.SeriesName.NativeTitle};
@ -586,19 +585,6 @@ public class ExternalMetadataService : IExternalMetadataService
if (relationshipExists) continue;
relatedSeriesDict[relatedSeries.Id] = relatedSeries;
}
// Process relationships
foreach (var relation in externalMetadataRelations)
{
var relatedSeries = relatedSeriesDict.GetValueOrDefault(
relatedSeriesDict.Keys.FirstOrDefault(k =>
relatedSeriesDict[k].Name == relation.SeriesName.PreferredTitle ||
relatedSeriesDict[k].Name == relation.SeriesName.NativeTitle));
if (relatedSeries == null) continue;
// Add new relationship
var newRelation = new SeriesRelation
{
@ -969,7 +955,7 @@ public class ExternalMetadataService : IExternalMetadataService
return false;
}
if (!string.IsNullOrEmpty(externalMetadata.CoverUrl) && !settings.HasOverride(MetadataSettingField.Covers))
if (string.IsNullOrEmpty(externalMetadata.CoverUrl))
{
return false;
}