Instant Mix answers empty everywhere, and the similarity score it was excluded for does not exist #197
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?
Instant Mix is stubbed as an excluded feature, and the reason recorded for the
exclusion is wrong.
All seven answer an empty
BaseItemDtoQueryResult, so every Instant mixbutton in the music UI does nothing.
ENDPOINTS.mdcounts the tag 7 / 7answered, which is true of the routes and not of the feature.
There is no similarity score and no provider. Upstream's whole implementation
is
upstream/Emby.Server.Implementations/Library/MusicManager.cs, 135 lines,reaching nothing but its own database:
Everything else in the file funnels into that: a song mixes on its own genres
and is put at the head of the result; an album, an artist and a playlist mix on
theirs; a folder mixes on the genres of every
Audiobeneath it plus its own;a
MusicGenremixes on its own id.GetInstantMixFromItem(line 99) is thedispatch and answers an empty list for anything that is none of those.
What this needs here
Limit = 200and a random sort, whichcrates/ephyra-db/src/query/already builds every other listing with —GenreIdsandItemSortBy.Randomboth need checking against what the querybuilder spells today.
MUSIC_TYPE_NAMESin
crates/ephyra-core/src/item/kind.rsis the set that has genres.MusicGenrespair by name and by id, which resolve a by-name row the waythe other by-name routes in
crates/ephyra-http/src/routes/library/do.absent.rs.Verifying it
Random ordering is the catch: two servers asked the same question answer the
same 200 rows in different orders, and the harness compares envelopes. Worth
settling whether the diff sorts the ids before comparing, or whether the
scenario asks with a seed the query builder does not have.
Randomis a sortthe query builder may already refuse to make deterministic — check before
writing the scenario, because a scenario that cannot fail is worse than none.
The reference library has a music library with genres on its tracks, so this
needs no new fixture.
Done in
306605c6.The port is
crates/ephyra-http/src/routes/library/instant_mix.rs, and theseven stubs are gone from
absent.rs.Measured against upstream rather than read out of the C#. Ours and a
pinned upstream were stood up on the same anchor copy and asked the same
questions. Where the two-hundred cap does not bite, the answers are the same
set of rows:
Where it does bite, the counts agree and the samples differ, which is what a
random order over one pool means:
The 201 is upstream's: the track is prepended after the cap.
Driven through the web client. On the reference fixture, pressing Instant
Mix on an album played:
What the review changed
AudioBook : Audio, so it takes thesong branch; the port had matched
Audioexactly and answered nothing.no-genre case — now have one each, and deleting the first two fails them.
The playlist arm and the folder arm compute the same thing here, because
ancestor_iddoes not followLinkedChildren, so no test separates them.ENDPOINTS.mdregenerated; the seven rows saidabsent.One note for whoever writes the remote-search routes
The exclusion comment above the
RemoteImagesstubs — the remote metadataproviders, which nothing here can reach — is as stale as this one was. M10
landed the providers. See #199 and #200.