Skip to content

Commit

Permalink
fix: fix anime staff name if it's empty
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Sep 17, 2024
1 parent e28feb8 commit b533c5c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Shoko.Server/Providers/AniDB/HTTP/AnimeCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,11 @@ private void CreateCharacters(List<ResponseCharacter> 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,
Expand Down Expand Up @@ -1053,6 +1058,11 @@ private void CreateStaff(List<ResponseStaff> 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
{
Expand Down

0 comments on commit b533c5c

Please sign in to comment.