Skip to content

TMDB Franchise placeholder collection can't be configured in the web app #1639

Description

@Quick104

Problem

Applying the Franchise Collections or All Defaults template bundle creates a "TMDB Franchise" collection with no TMDB collection ID. The template's description and the sync error both tell the admin to "edit the collection's source config", but the web collection editor can't change a franchise collection's source. From the web app, the collection can only be left empty or deleted. Every admin who applies All Defaults ends up with one.

The placeholder ships with collection_id 0 and no sync schedule. Bundle apply skips its first sync and reports it as created_sync_skipped_unconfigured, so the collection starts empty. A manual sync, or any schedule the admin adds, fails with "TMDB franchise template requires a collection_id — edit the collection's source config and supply a real TMDB collection ID".

For a TMDB collection whose source mode is tmdb_collection, the editor offers Libraries, Title, Description, Poster, Backdrop, Default Sort, and Sync Schedule. In place of source fields it shows: "This collection follows a TMDB franchise or discover filter from a template. Its source can't be changed here; saving keeps it as it is." Only a direct PATCH /api/v2/admin/collections/{id} with a new source_config can set the ID.

I found this by reading the code while auditing the docs for #1635. I didn't reproduce it on a running server.

Options

  • Add a TMDB Collection ID field to the editor for tmdb_collection sources, and change the sync error to point at it.
  • Or ask for the ID when the bundle is applied, and skip creating the placeholder when none is given.
  • Or remove the placeholder from the Franchise Collections bundle, and so from All Defaults. That also means dropping it from the catalog or relaxing TestBundleOnlyTemplatesAreReachableFromBundles, which requires every tmdb_collection template to be in a bundle.

Technical notes

  • Template: internal/collections/templates/builtin.go:1631 (CollectionID: 0, DefaultSyncSchedule: ""). Bundle membership: builtin.go:1790. withAllDefaultsBundle (builtin.go:1795) adds it to all_defaults.
  • Apply skips the first sync: templateBundleTemplateCanInitialSync, internal/api/handlers/library_collections.go:1681; the skip reason is set at library_collections.go:1564.
  • Sync failure: validateTMDBFranchiseConfig, internal/catalog/library_collection_service.go:522, called from syncTMDBFranchiseCollection at line 537.
  • Editor: tmdbSourceKindOf returns "other" for any mode other than tmdb_list, tmdb_preset, or empty (web/src/pages/adminCollectionsShared.tsx:280). CollectionEditForm then sends the stored source_config back unchanged (adminCollectionsShared.tsx:1637) and shows the note at adminCollectionsShared.tsx:1866. The editable fields start at adminCollectionsShared.tsx:1752.
  • The API accepts a new source: AdminCollectionUpdate.SourceConfig, internal/apiv2/admin_collection_types.go:90, passed through by updateAdminCollection (internal/api/handlers/admin_collections_service.go:273); validateAdminCollectionSourceUpdate (line 312) only restricts Trakt and TMDB list sources.
  • Tests: TestPhase3FranchiseTemplatesUseExpectedBands requires the placeholder with ID 0; TestRegisterAcceptsPlaceholderTMDBCollection covers validation.

AI disclosure

  • Harness: T3 Code (Claude Code agent harness)
  • Tool(s): Claude Code, GitHub CLI
  • Model(s): claude-opus-5-5
  • Involvement: AI-assisted; filed at the maintainer's request
  • Adversarial review: n/a

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions