Deduplicate organize by multi-source metadata

This commit is contained in:
ShukeBta
2026-06-14 01:25:44 +08:00
parent 4a3ed77395
commit a623702276
14 changed files with 424 additions and 49 deletions
+6
View File
@@ -385,6 +385,12 @@ func (r *MediaRepository) upsert(ctx context.Context, m *model.Media) error {
if m.BangumiID > 0 {
setIfChanged(updates, "bangumi_id", existing.BangumiID, m.BangumiID)
}
if m.DoubanID != "" {
setIfChanged(updates, "douban_id", existing.DoubanID, m.DoubanID)
}
if m.TheTVDBID != "" {
setIfChanged(updates, "thetvdb_id", existing.TheTVDBID, m.TheTVDBID)
}
if m.Languages != "" {
setIfChanged(updates, "languages", existing.Languages, m.Languages)
}