Skip to content

Commit

Permalink
fix: only add the same tag once
Browse files Browse the repository at this point in the history
in case we're using a newer tag
  • Loading branch information
revam committed Nov 23, 2024
1 parent 5c286d4 commit d41fee3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Shoko.Server/Providers/AniDB/HTTP/AnimeCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,10 @@ public static bool CreateTags(List<ResponseTag> tags, SVR_AniDB_Anime anime)
continue;

var tag = FindOrCreateTag(rawtag);
if (newTagIDs.Add(tag.TagID))
continue;

tagsToSave.Add(tag);
newTagIDs.Add(tag.TagID);

var xref = RepoFactory.AniDB_Anime_Tag.GetByAnimeIDAndTagID(rawtag.AnimeID, tag.TagID) ?? new();
xref.AnimeID = rawtag.AnimeID;
Expand Down

0 comments on commit d41fee3

Please sign in to comment.