A studio and a genre parsed from an NFO are dropped #61
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 studio and a genre parsed from an NFO are dropped.
scan/nfo.rsreads<studio>and<genre>, andrun.rs::local_metadata(around line 962) applies neither — it takes
overview,original_title,sort_title,provider_ids,titleandyearand leaves the rest on thefloor. So this port records no
ItemValuesof typeStudiosat all, and thestudio validator ported alongside the genre and artist ones has never had real
data to run against.
Recording them is not a one-line change: it wants a
studiosfield onitem::Write, aStudiosbinding in the insert column list, anItemValueType::Studiosarm inlist_underincluding its delete clause, and amatching field in
item::Tracked/filed()/summary::describes— otherwisethe unchanged-detection starts re-filing every folder on each pass.
Found while porting the by-name validators (#57, #60).
A studio and a genre an NFO names now reach the row.
Upstream reads
<studio>(BaseNfoParser.cs:437) and<genre>split on/(
:576-591), de-duplicating case-insensitively and keeping the first spelling.Both land in two places: the
BaseItems.Studios/Genrescolumns as a|-joined list (BaseItemMapper.cs:257,284) and oneItemValuesrow each oftype 3 and type 2 (
ItemPersistenceService.cs:661). This port now does both.Nothing is double-recorded. The genres already here come from container tags,
and
local_metadataruns before the probe whileembedded()only fills what isempty — which is upstream's own order.
One extra path fell out of it: the prober already derives studios from
copyrightfor a video, and only the video path consumed it upstream. Wiredinto
embedded()and deliberately not into a track's tags, matchingAudioFileProber.Measured on a purpose-built NFO library:
ItemValuestype StudiosItemValuestype GenreStudioby-name rowsGenreby-name rowswith the columns in upstream's shape —
Studios = 'Brandywine Productions|20th Century Fox', and''rather thanNULLwhere nothing is named. That is thefirst real data the studio validator ported in #57 has ever had.
The rescan invariant holds, checked three ways: a real double scan
(
written=0 summarised=0, zero rows with a movedDateLastSaved), a newregression test over a real database, and the full suite. The earlier scoping
of this issue was over-cautious —
item::Trackedandsummary::describesneedno studios field, because they compare only what a music folder's summary
decides, and studios are not summarised from tracks.
Two things worth recording.
This writes nothing on the measured library. All three libraries under
/mnt/mediahold zero.nfofiles, so the change adds no rows there. It agreeswith offline upstream before and after, both at 0 studios.
The production database is not the answer key for studios. It ran with TMDB,
TVDB and MusicBrainz enabled — 95,610 provider rows — so its 830 studios are
production companies and record labels fetched from the internet, not anything
derivable from the files.
var/big-upstream, which is upstream over the samelibrary with providers disabled, records 0. I had pointed this work at the wrong
database and the measurement caught it.
Not verified: the
/Studiosand/GenresHTTP listings, because this portserves no
/Startup/User, so no account can be created against a freshdatabase. Compared at the row level instead.