Repository navigation
Conversation
MDBList's public /json feed leaves episodes out, so a list of episodes reads as empty and its collection never fills. An empty feed now falls through to the MDBList API when the server has a key. The API client reads /items/episode when /items is empty, and the sync matches each episode by its show's TMDB ID and TMDB numbers, which are the provider numbers of a TMDB-matched series.
The live API returns an episode list's episodes in an episodes array
on /lists/{id}/items. /items/episode answers 405, so the fallback to
it would have failed the sync of every empty list.
library_collection_items gains episode_id and season_id beside media_item_id, each with its own cascading foreign key, and a generated member_id that is the primary key. Writers and plain-ID readers move to member_id; ReplaceItems stores a member in the column its kind names.
The MDBList API lists a list's seasons in their own array, named by show TMDB ID and season number. A synced collection now matches them to the catalog's seasons and stores episodes and seasons as members of their own kind. A season counts as in a library when any of its episodes has a file there.
A stored collection's page reads its members as titles, episodes, or seasons. Episodes come from the episode relation and seasons from a new relation in the same shape; both pass through their series' access. Season cards name their series and number as episode cards do.
A collection's stored and per-viewer item counts include its episode and season members, judged as its page shows them: an episode with a file in some library, a season with such an episode, and for a viewer only those whose series they can open. Rating limits and excluded types now judge the series row, which fixes the page's member fetch under a rating limit.
An episode or season member lends the collection's collage its season's or series' poster, under the same access rules as its card. A poster already chosen is not repeated, so a list of one show's episodes shows that show once; the collage is picked from a bounded window of members so the query still stops early on large collections.
A stored collection's episode and season members are BoxSet children in curated order and count toward its total, under the native page's access rules. An episode member lists as an Episode with its series context and a season member as a Season a client can open. Play all plays an episode member as it is and a season member as its visible episodes, each leaf once. Counts, collages and the BoxSet page share one catalog helper for the member branches.
… rows The catalog reads a stored collection that holds episodes or seasons through one relation of its titles, episodes and seasons, each branch applying membership, library scope and the viewer's access, so the web collection page, Jellyfin's resolved order, home rows built from the collection and shuffle list them in curated order or under a sort. Collections of titles only keep their current queries. Season cards in the catalog and in rows name their series and number, and shuffle plays a season member's episodes.
…e rows cheaply Readers switch to the member relation through one helper, the preview takes the library scope and skips an unused count, a partial index finds a collection's episode and season members, and the BoxSet's Play all looks up seasons only among members that are not episodes. Docs and comments match the code.
A season 0 member with no title of its own showed as "Season 0" on collection cards, rows and the Jellyfin BoxSet, where its own page says Specials. Both readers now share one season title expression.
MDBList names an episode by TMDB's season and episode numbers, which differ from a series numbered by TVDB or in another order, so the sync could store the wrong episode. The API also gives each episode and season its TMDB ID; matching tries that first and falls back to the numbers.
…nd no key is set The public feed answers a list of episodes or seasons empty, and without a server MDBList key the sync stored that as an empty success, so clearing or rotating the key emptied a collection the key had filled. The sync now fails with a message naming the key and keeps the members.
… all by access A sorted BoxSet request browsed the catalog, which reads titles only, so a collection of episodes answered empty. Such a collection now keeps its curated order under a sort. Play all counted an episode member whose series was above the viewer's rating, leaving an empty first page; it now judges episode members as the BoxSet's children are judged.
A selective restore looked a collection's members up among titles only, so it counted an MDBList collection's episodes and seasons unknown and added none of them. It now finds them in episodes and seasons too.
The collage read a collection's titles under a union with its episode and season members, which could read every title member before the limit. The title branch now stops at the window in member order.
…MDB ID The number fallback could pick an episode or season at the entry's numbers that carries a different TMDB ID, the case a library numbered unlike TMDB produces. Rows without a TMDB ID still match by number.
An import of an episode list on a server without an MDBList key answered a generic 500 and left the created collection behind. The sync now records a warning run naming the key and keeps the members, so the import returns the collection and the reason.
…he viewer can't open A series can span libraries with different access. An episode member whose only file sat in a library the viewer couldn't open was listed, counted and queued by Play all, though playback had no file to play.
Season children of a BoxSet carried a poster path but no poster URL, so the season mapper set no Primary image tag and Jellyfin clients drew the season without artwork.
…es category Roku and Android TV open a collection with the library category's media scope. The executor tested that scope against each member's own type, so a Series category showed none of a collection's episodes or seasons. An episode or season member now counts as its series under a scope, and a Movies category still lists movies alone.
A season without artwork took its series' poster as its Primary tag, but the image endpoint serves a season's own poster only, so a client fetching that tag on a node without the cached URL got a 404.
With a library's Series category the executor still treated every row as a series, so a watched filter looked for episodes of an episode or season member, found none, and listed a watched episode as unwatched.
The stored message names the MDBList key, but the v2 admin API reports no sync message, so admins see only the warning status.
A private list, and a list of episodes or seasons, sync only with an MDBList API key, but the admin API reported only a generic sync failure or a warning. checkAdminMDBListLink tells an admin before creating whether a link needs a key the server lacks, and admin collections and sync runs carry a mdblist_api_key_required reason that clients show in their own words.
Pasting a link to a private list, or a list of episodes or seasons, on a server without an MDBList key now says under the field that the list syncs only after a key is added in Settings > Providers. A saved list whose sync read nothing for want of the key shows that in its sync alert, its row in the collection list, the toast after it is created and Sync now.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait...
|
|
Please add before-and-after phone-width captures of the missing-key result after creating a collection (toast and admin list row), and the sync-failure alert in the existing collection editor. These are changed user-visible states, and the evidence requirement covers mobile web separately from desktop. If either state is desktop-only, explain why mobile is unaffected. |
…wn file library_collection_service.go crossed the repository's 1000-line limit; the MDBList key reasons, link check and episode and season matching move unchanged into library_collection_mdblist.go.
…nd season members The previous release replaces a collection's members by deleting every row whose media_item_id its list leaves out, which an episode or season member never matches; one of its servers syncing an episode list during a rolling upgrade would empty the collection. A trigger now refuses a direct delete of such a member unless the transaction marks itself as this release's, so the old sync fails and the members stay. Cascading deletes still go through.
The episode merge deletes the source's collection member when the kept episode is already in that collection, a direct delete the new member guard refuses unless the transaction opts in. It now opts in, through the helper catalog's own member deletes use.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Offset paging counted only the items it kept, so a page of episodes or seasons without a show ID made it ask for the same page again, forever when the first page held nothing usable.
…r can open A season member of a series spanning libraries was listed and counted from episodes in any library, so a viewer could see a season whose episodes all sit in a library they can't open. It now uses the native member relation's library check.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
A list the feed answers empty is read through the MDBList API, which returns MDBList's rank order and is capped by rank, whatever sort the link names. Only the public feed follows a link's sort, so a public list of episodes or seasons keeps rank order, like a private one.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|

Problem
Related issue: #3670
Validation tasks: reaches #193 S3, S5, S6; #194 A1, A5; #195 W1, W5 (title members behave as before)
Other clients: Apple Silo-Server/silo-apple#1366; Android Silo-Server/silo-android#1144; Roku Silo-Server/silo-roku#133; Web in this pull request
A server collection synced from an MDBList list of episodes, such as a list of Christmas episodes, stays empty. MDBList's public feed (
/json), which the sync reads, lists nothing for episodes and seasons, so the sync matches no titles and the admin gets no reason. Kometa builds such collections, so users expect it to work.This change reads those lists through MDBList's API with the server's MDBList key and lets a server collection hold episodes and seasons next to movies and series, on every surface that shows a collection. Without a server key, the admin is told that the list needs one, both while pasting the link and after a sync.
Approach
library_collection_itemsgetsepisode_idandseason_idcolumns with their own cascading foreign keys, and a generatedmember_idthat keys the table. Existing rows are titles and need no backfill. A unique index on(collection_id, media_item_id)stays beside the new key so servers of the previous release can keep writing titles during a rolling upgrade. A delete trigger refuses a direct delete of an episode or season member unless the transaction opts in, so a previous-release sync, which would replace a collection by deleting every row without a title, fails and leaves those members alone. This release's member deletes opt in.GET /api/v2/admin/collections/mdblist/link(checkAdminMDBListLink, capabilitymdblist_link_check) tells the admin editor whether a pasted link needs a key the server lacks. Admin collections and sync runs carrylast_sync_reason/reasonmdblist_api_key_required, which the web app shows in its own words. The two strings are in feat(web): add MDBList API key notice strings for synced lists silo-translations#236; this branch syncs them from that branch and re-syncs from its release before merge.Known limits, documented in
docs/architecture/collection-members.md: a list that mixes movies or shows with episodes syncs from the feed and leaves its episodes out; personal collections stay titles-only; a library whose episodes have no TMDB IDs (the TVDB plugin) matches episodes by number only; the collection page's filter options come from title members.Validation
go mod tidy -diff,make lint-changed,make lint-router-recoveryandmake test-gopass, with the DB tests run against a freshly migrated Postgres. One plugins DB test failed once while other packages shared that database and passes on its own. New DB tests are listed inscripts/ci/db-contracts.txt.verify-actionlintandverify-shellcheck(tools not installed); this change touches no workflow or shell script.TestApplyEpisodeMergesDBnow merges two episodes that sit in the same collection.make test-webpass.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-5937/
Surface and build: web app collection page (desktop and phone), library Collections card, Shuffle, and web admin collection editor (desktop and phone). Before on
835131fe1(main), after on this branch's head, with the same local test library.Risks
library_collection_items(a stored generated column) under its lock. The table holds one row per member, small next to the catalog tables.--version <release>.sort=usort. With Max titles set, ranking also decides which members the collection keeps. The two PRs don't conflict in code. Whichever lands second updatesweb.collections.syncedList.listOrderHelpto say that private lists and lists of episodes or seasons always come in MDBList ranking.docs/catalog-api.mdanddocs/architecture/collection-members.mdalready say this. The manual follow-ups stay in Docs: describe the MDBList order choice for synced lists siloserver.org#505 and FR: Import/Export Home screen configuration #506.Checklist
AI Disclosure
Note
Add episode and season members to MDBList library collection sync
media_item_idnullable, addsepisode_id/season_id, and a generatedmember_idused for primary keys, ordering, and dedup (migration).SeasonRepository.ListIDsByNumbers,EpisodeRepository.ListByProviderNumbers) and stores them as typed members (lists.go, library_collection_service.go).GET /api/v2/admin/collections/mdblist/linkplus alast_sync_reasoncode so the web UI can show a localized 'MDBList API key required' warning with a link to provider settings (admin_collections.go, mdblistLinkCheck.ts).silo.collection_member_writesis set — checkAllowCollectionMemberDeletescallers in library_collection_mutations.go and the reattribution path in reattribute.go. Down migration deletes non-title member rows.Macroscope summarized 7b2e542.