From b533c5c6e1764d1714630d4d4d18625e956bbc3b Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Tue, 17 Sep 2024 17:50:19 +0200 Subject: [PATCH] fix: fix anime staff name if it's empty --- Shoko.Server/Providers/AniDB/HTTP/AnimeCreator.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Shoko.Server/Providers/AniDB/HTTP/AnimeCreator.cs b/Shoko.Server/Providers/AniDB/HTTP/AnimeCreator.cs index 48b536be9..a1206a3d3 100644 --- a/Shoko.Server/Providers/AniDB/HTTP/AnimeCreator.cs +++ b/Shoko.Server/Providers/AniDB/HTTP/AnimeCreator.cs @@ -927,6 +927,11 @@ private void CreateCharacters(List chars, SVR_AniDB_Anime ani // we need an ID for xref RepoFactory.AnimeStaff.Save(staff); } + else if (string.IsNullOrEmpty(staff.Name) && !string.IsNullOrEmpty(rawSeiyuu.SeiyuuName)) + { + staff.Name = rawSeiyuu.SeiyuuName; + RepoFactory.AnimeStaff.Save(staff); + } var xrefAnimeStaff = RepoFactory.CrossRef_Anime_Staff.GetByParts(anime.AnimeID, character.CharacterID, @@ -1053,6 +1058,11 @@ private void CreateStaff(List staffList, SVR_AniDB_Anime anime) // we need an ID for xref RepoFactory.AnimeStaff.Save(staff); } + else if (string.IsNullOrEmpty(staff.Name) && !string.IsNullOrEmpty(rawStaff.CreatorName)) + { + staff.Name = rawStaff.CreatorName; + RepoFactory.AnimeStaff.Save(staff); + } var roleType = rawStaff.CreatorType switch {