Half a real library's episodes are never returned #47
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?
Half the episodes in a real library are invisible.
Replaying a production database through both servers,
/Items?Recursive=trueanswers:
Every other type agrees exactly — 4889 Audio, 329 MusicAlbum, 289 Series, 284
Movie, 102 Folder, 67 MusicArtist.
The gap is the virtual items, to the row: 6922 episodes and 405 seasons carry
IsVirtualItem=1, which is 14827−7905 and 1113−708. Both servers read copies ofone database, so nothing was scanned differently — these rows are read and
dropped.
ItemsControllersetsIsVirtualItem = falseonly when the request asks for it,through
ExcludeLocationTypesorLocationTypes(ItemsController.cs:505-513).The user's
DisplayMissingEpisodesis applied inFolder.cs:1875andTvShowsController.cs:231, not on this route — so upstream returns virtualitems here whatever that setting says. Measured with
DisplayMissingEpisodes=0for the user asking, and upstream still returned all 14827.
Nothing in the reference library is a virtual item, which is why no scenario
catches this.
Virtual items are returned again, and the request decides — as upstream's does.
ItemsController.cs:505-513setsIsVirtualItemonly from what the requestasked:
ExcludeLocationTypesholdingVirtualexcludes them, andLocationTypesselects on whether it namesVirtual— naming all four isnaming no filter.
IsMissingis the fallback the SQL reads(
TranslateQuery.cs:948),IsResumableoverrides both(
BaseItemRepository.cs:107), and aSeriesparent rewrites its own query(
Series.cs:241,282).DisplayMissingEpisodesnever reaches this route.The default in this port was
Excluded. That was the bug — it is now therequest's answer, with
Excludednamed at the six places upstream names it.Measured on one production database, both servers:
IncludeItemTypes=EpisodeIncludeItemTypes=SeasonRecursive=true(all)LocationTypes=VirtualExcludeLocationTypes=VirtualIsMissing=trueLocationTypes=VirtualLocationTypeis now derived from the stored path, matchingBaseItem.cs:328,and a series'
ChildCountin a listing went from 186 of 289 wrong to 0.One difference remains on this library and it is not this issue: five real
episodes upstream does not list. They are alternate rips of five Witcher
episodes the folder holds twice, and upstream drops a row carrying a
PrimaryVersionId(TranslateQuery.cs:794). Filed separately.