The library dialog is offered no metadata providers, so fetching cannot be turned on #170
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?
There is no way to turn metadata fetching on from a client. The library dialog
renders its "Metadata downloaders", "Image fetchers" and "Metadata savers"
sections from
/Libraries/AvailableOptions, and we answer every list empty:crates/ephyra-http/src/routes/library/structure/reading.rs::available_optionsreturns
LibraryOptionsResultDto::default()and reads nothing at all — not theproviders, not the requested content type, not
isNewLibrary. Upstream'sLibraryController.GetLibraryOptionsInfo(Jellyfin.Api/Controllers/LibraryController.cs:864)builds each list from the metadata plugins registered for the item types the
content type covers, which is what puts the checkboxes on the page.
The providers are here.
crates/ephyra-app/src/metadata/holdstmdb/,omdb.rs(The Open Movie Database),musicbrainz.rs,audiodb.rsandartwork.rs, andcrates/ephyra-server/src/libraries.rs:431falls back toTmdbUtils.ApiKeyso a server configured with no key still asks what upstreamwould ask. What decides whether any of it runs is
LibraryConfig::fetch_metadata— one boolean per library, reachable by editing
config.tomland by nothingelse.
The result on a fresh install: every item keeps the name of the folder it was
found in, has no overview, no rating, no genres, and a still cut by ffmpeg where
a poster would be. Nothing in the dashboard says why, because the page that
would say so has no controls on it.
This is the read half of the same wall as #167, which is the write half — the
options a client does post are dropped. Either alone leaves fetching
unreachable.
Where to start
available_optionsneeds the providers named per item type, inLibraryOptionsResultDto's shape:TypeOptionscarryingMetadataFetchersandImageFetchersfor each representative type of the content type asked about,and
MetadataReaders/MetadataSaversfor the NFO reading and writing thisserver does. Names have to be upstream's own, because they are what a posted
LibraryOptionsnames back.Fixing this without #167 changes nothing a user can see: the checkboxes would
appear and be discarded on save.
How to know it is done
The library dialog shows the downloaders on a fresh install, ticking one and
saving leaves it ticked after a reload, and the next scan of that library fills
in overviews and posters. A test over the route that asks what a movies library
is offered, failing today.
House rules
CLAUDE.mdis the short version and these are the parts that bite: tests rununder
cargo nextest; upstream's source is the checkout inupstream/at thepin; generated files are regenerated rather than edited; a comment says what
the code does, not how it got there.
A test that cannot fail is worse than none.
Landed in
7cd13b3, with review fixes in9f43537./Libraries/AvailableOptionsnames the databases this server actually asks,per representative item type, under upstream's own plugin names — a client posts
those names back in
LibraryOptions, so the spelling is the contract.crates/ephyra-app/src/metadata/offered.rsis where that lives, beside theproviders rather than in the route.
What will not run is left out rather than offered and ignored: no subtitle or
lyric fetcher, no media segment provider, no similar-item provider, and no
metadata saver — the scan reads an
.nfoand never writes one, so offering thesaver would be a checkbox nothing honours.
Three things the review corrected, all of which a client could see:
Artwork Repositorywas offered as the image fetcher for artists and albums.It is upstream's
StudiosImageProviderandSupportsisitem is Studio;our own scan fetches artist and album images from TheAudioDB
(
scan/run/remote.rs), which is what upstream registers too.ServerConfigurationdisables things out of the box —DisabledMetadataFetchers = ["TheAudioDB"]for bothMusicAlbumandMusicArtist— so a music library now reports those unticked, as upstreamdoes.
the plugins whose item type the content type covers, and
MediaBrowser.XbmcMetadataregisters none for Book, BoxSet, Playlist orPhoto, so a library of those is offered no reader and the dialog draws no
section for one.
Fixing this alone would have changed nothing a user can see, which is why it
went in with #167.