A person and a year are derived rather than written #60
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A person and a year are still derived rather than written.
The scan now writes rows for genres, music genres, studios and artists, as
upstream's validators do.
PeopleValidatorwas left out, and years were neverin scope, so
/Personsand/Yearsstill derive their entries from the valuetable.
A derived entry carries no id that survives a rescan, no sort name, no images
and no date — the same shortfall the by-name rows were written to close.
Also unexercised: this port records no
ItemValuesof typeStudiosat all(
scan/nfo.rsreads<studio>and drops it), so the studio validator is portedand unit-tested but has never run against a library that records one.
A person a scan credited is now a row. A year is not, and should not be.
People are not made by
PeopleValidator. They are created at item-save timeby
LibraryManager.SavePeopleMetadataAsync(LibraryManager.cs:3556), whichcalls
GetPerson(name)per credit and creates aPersonwhen nothing answers.The validator only refreshes metadata — skipping any name with no row — and
sweeps the dead ones:
IsDeadPersonis!Peoples.Any(f => f.Name == e.Name)(
TranslateQuery.cs:936), skipping locked rows. Names come from thePeoplestable; a person is never an
ItemValuesrow.Years have no validator at all.
/Yearsderives its entries per request:YearsControllermaps eachProductionYearthroughGetYear, which isCreateItemByName<Year>— created lazily by the first request that needs it.Upstream's production database holds exactly 1 year row against 33,082
person rows. Deriving is the correct behaviour, so no year validator was
invented.
Measured against upstream's own database (33,082 person rows, 32,580 distinct
credited names), its person rows removed and the naming step run over it:
SortNamematchingPathmatchingThe 10 name disagreements are one person spelled two ways hashing to one id
(
Alex Macqueen/Alex MacQueen, NFC/NFD pairs); upstream froze whichever itsaw first, we take the first in name order — same id, same row.
The 595 upstream ids we wrote nothing for all got a row from us under a
different id, and in every one of the 594 that share a path, the row our
derivation reproduces is the older one. They are duplicates the running
container made under a different metadata-path key.
The dead sweep run against upstream's untouched database would delete exactly
3 rows — precisely upstream's own
IsDeadPersonset.Left undone, and bigger than it looked: this port records no
ItemValuesoftype
Studiosbecauserun.rs::local_metadataapplies neither the<studio>nor the
<genre>an NFO parse already produces. Recording them touches thewrite shape and the unchanged-detection, so the ported studio validator still
has no real data to run against. Filed separately.
Also worth knowing:
named_idhashes an absolute path where the metadatadirectory sits outside the data directory, which is the reference container's
layout but not a real install's. That applies to genres, studios and artists
already and is a property of the configuration rather than of this change.