Repository navigation
refactor(providers): online Bangumi authors from structured staffs + publisher split fix - #26
Merged
Merged
Conversation
Staff ingest split every record's name on ・ et al., which broke publishers whose names legitimately contain it (subject 60347: スクウェア・エニックス was split into two fragments, name_cn dropped, and publisher_display_name could no longer match the infobox value). Only author-class positions (AUTHOR_POSITION_IDS) are split now; other positions keep the full name with annotations stripped, and name_cn is stripped instead of first-segment truncated so Chinese names like 史克威尔·艾尼克斯 survive.
…ine path The online staffs endpoint and the offline archive dump are populated from the same wiki data (verified identical (person_id, position) sets across samples), so the online mapper can use the same persons-primary logic as the archive path: authors come from author-class staff positions with name_cn preferred, falling back to infobox parsing only when no author-class staff relation exists. Removes the temporary infobox-primary online variant (to_*_persons_online, author_display_name, persons_name_mapping_only).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #25, two commits:
fix(providers): do not split publisher staff names on name separators (be8b213)
clean_author_namessplits on separators including・(U+30FB); applying it to all staff positions broke publisher display-name mapping — e.g.スクウェア・エニックス(subject/60347) was split into two fragments withname_cn = None, so the exact-match against the infobox publisher value missed and the Chinese name 史克威尔·艾尼克斯 was lost.AUTHOR_POSITION_IDS= 2001/2002/2003/2007/2009/2010) are split; other positions (publishers etc.) only get annotation stripping.refactor(providers): make structured staffs the author source for online path (62dec76)
/p1/subjects/{id}/staffs/personsendpoint and the offline archive dump are populated from the same wiki data: identical(person_id, position)sets across 8 sampled subjects (60347/268279/3510/64113/886/89713/1674/2735; differences only in post-snapshot freshness and dump-only fields pen_name/aliases).name_cnpreferred, falling back to infobox parsing only when no author-class staff relation exists.to_*_persons_online,author_display_name,persons_name_mapping_only) introduced in feat(providers): use Bangumi structured staffs for authors and name_cn mapping #25 — online and offline now share one code path.Verification: 288 tests pass (updated
online_persons_primary_authorscovers persons-primary + infobox fallback), clippy shows only the 4 pre-existing warnings, rustfmt clean.