A first scan leaves every TV series unidentified, and a series' own row is never described #176
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?
Found by clicking through the throwaway instance in
TESTCONTAINER/— a realCIFS library of 284 films, 294 series, 717 seasons, 7,975 episodes, every
library
fetch_metadata = true, scanned by the image built at33a1bdd.What it looks like
Every card in the Shows library is a placeholder. A series page has no poster,
no backdrop, no cast, no
Statusand no network.Recently Added in Showsonthe home screen is five blank season tiles.
What the rows say
Seriesrows and 0 of 717Seasonrows have a single row inBaseItemImageInfos. Films are 284/284 and episodes 7,971/7,975.Imdb, and neverTmdb.title the filename spells —
Star Trek - Strange New Worlds (2022) - S01E01 - Strange New Worlds [WEBDL-1080p]….mkvis filed asStar Trek - Strange New Worlds.The ids are the tell.
Imdbalone and an overview beside it is exactly whatOmdb::identifyreturns from its title search, so these rows were described bythe second database and never by the first.
Why
Tmdb::identify_series(crates/ephyra-app/src/metadata/tmdb/tv.rs:251) startsfrom an id the row already carries —
Tmdb, thenImdb, thenTvdb— andanswers
Nonefor a series carrying none of the three. There is no/search/tvrequest anywhere in the crate; the only two searches are
/search/collectionand/search/person.On a first pass over a folder named
Ted Lasso (2020)there is no id to startfrom. The
Imdbid the row ends up with is written by that same pass, afteridentification has already given up — so the first scan of a TV library
identifies nothing, and nothing below a series is identified either, because a
season and an episode both read the series' resolved id.
A forced per-item refresh is the proof.
Replace all metadataon Ted Lasso,whose row by then carries the
Imdbid the first pass wrote: its four seasonscome back with
TmdbandTvdbids and real posters, and its episodes comeback with real titles.
The series' own row is a second hole
That refresh left the series itself unchanged — still no
Tmdbid, still noimage — while the seasons under it succeeded.
from_tmdbandfetch_picturesask about a
Kind::Serieswithasked_about(remote, item), the ids on the row,rather than with the lookup
identified_seriesjust resolved(
crates/ephyra-app/src/scan/run/remote.rs:117and:239).series_id()readsTmdboff what it is handed, finds none, and both the fields and the artworkcome back empty on the very pass where everything below the series works.
Upstream
TmdbSeriesProvider.GetMetadatafalls back toSearchSeriesAsync(cleanedName, …, info.Year ?? parsedName.Year ?? 0)—upstream/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs:205. Afolder with no id in its name is identified on the first pass, and a scan of
this library would come back with posters.
Where to start
Two edges, and they are separable.
metadata/tmdb/tv.rsneeds the name searchidentify_seriescurrently has nofallback to — TMDb's
/search/tv?query=…&first_air_date_year=…, over the sameMetadataHttpport, matching what upstream'sSearchSeriesAsyncsends.scan/run/remote.rsneeds aKind::Seriesto be asked about through theidentified lookup rather than through the row, so its own fields and pictures
land on the pass that resolved it.
How to know it is done
A scan of a TV library whose folders carry no ids leaves every series with a
Tmdbprovider id and a poster on the first pass, episode titles are the onestheir filenames spell, and the fixture's series exercise both edges — the
scan_enrichedanswer key should disagree today.House rules
Tests run under
cargo nextest; upstream's source is the checkout inupstream/at the pin. Generated artifacts are regenerated, never edited.Fixed in
28bdd65, with the review's findings in113caba.Both edges are closed.
identify_seriesfalls back to/search/tvon thename and the year, which is what upstream does and what identifies a library
whose folders carry no ids; and a series is asked about through the lookup the
pass resolved rather than through the ids on its row, so its own fields and
pictures land on the pass that identified it.
Verified on the throwaway instance's real library — the same 294 series this
was measured on. Before: 0 carried a
Tmdbid and 0 had a single rowin
BaseItemImageInfos. After refreshing three of them on the fixed build:Four pictures each — poster, backdrop, logo and thumb — and the library grid
draws them, with the
2011 - 2017and2024 - Presentranges that only comefrom a series the database answered for.
One thing the review caught, and it is the reason a review is worth the round
trip: asking through the pass' lookup alone threw away the ids a
tvshow.nfocarries. That file is read into the row before any database is asked, and an id
in it is the operator saying which series this is — a folder called
The Officewith atmdbidwould otherwise have been described as whicheverseries a search answered with first, and stuck that way, because the next pass
would find it already resolved. What the item names now wins and the pass fills
only what it leaves empty.