Only one backdrop is taken, and three artwork sources are unread #25
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?
An item may carry several backdrops and takes only one here, and three
sources of artwork upstream reads are not read at all.
LocalImageProvider.PopulateBackdropsis not a first-match-wins list —Backdropis the one type
ItemImageProviderdoes not collapse to a single image, soupstream keeps every match:
<name>-fanart, thenfanartandfanart-1..fanart-20backgroundandbackground-1..background-20artandart-1..art-20extrafanart/directorybackdropandbackdrop1..backdrop20Ours takes the first of
fanart,background,art,backdropand stops, sothe first backdrop agrees with upstream and any further one is missing.
extrafanart/also needsaccompanyingto stop filtering directories out.Two more sources, neither ported:
PopulateSeasonImagesFromSeriesFoldergives a season its primary, backdrop,banner and thumbnail from
season01-poster,season01-fanartand the restsitting in the series folder. A season now reads its own folder and
nothing above it.
EpisodeLocalImageProviderreads ametadata/subdirectory of the episode'sfolder as well as the folder itself.
Found while reviewing #6, which fixed the folder lookup and the rules it made
reachable. None of this is a wrong answer — it is artwork upstream finds that
this does not.
Fixed in the merge of
fix/25-artwork-sources.What changed
A backdrop is the one picture an item may carry several of, so every one of
them is taken. Each family is read whole —
fanartandfanart-1upward,then
background, thenart, then whatever anextrafanartdirectory holds,then
backdropandbackdrop1upward — numbered to twenty and giving up oncethree are missing, counted over the run rather than three in a row, which is
upstream's own counter.
The two sources nothing read:
the season is called and what it is numbered — so
Specialsanswers to bothspecials-posterandseason-specials-poster, andSeason 1toseason1-and
season01-. It answers under the name the library resolved to and notunder a title its own document gave it: upstream looks for an item's pictures
before it reads a document beside it.
metadatadirectory beside it as well as to thefolder holding it.
Everything but a backdrop is still one picture. That had to come with this:
a season now has two rules naming its primary, and upstream keeps the first
and drops the rest.
What this dragged in
Creating an
extrafanartdirectory — which is what this feature asks a user todo — cost a film the name of its folder and filed a row for the directory
itself, because nothing here ignored it. The directories upstream never
resolves media out of are now ignored at resolution:
metadata,extrafanart,extrathumbs,subs,.actors, the recycle bins, and the rest ofIgnorePatterns.cs's directory block. The artwork rules still read the twothey need, reaching them outside the resolver as upstream does.
That turned up a test which had encoded the unignored behaviour: a film sharing
its folder with
Subs/was taking its file's name where upstream gives it thefolder's.
Verified against
Upstream's source rather than a diff: no library here carries local artwork
beside its media — the reference fixture has none, and the real one's backdrops
were fetched into the metadata directory rather than found on disk. The rules
are pinned by tests in
crates/jellyfin-app/src/scan/images.rsandcrates/jellyfin-app/tests/scan_images.rs, each written fromLocalImageProvider.cs,EpisodeLocalImageProvider.csandItemImageProvider.cs.Left for later
sample.*,minta.*,small.jpg,albumart.jpg, and hidden directories as a class.