Skip to content

[v1] Automatic movie collection grouping #677

Closed

Description

@tomislav

Summary

Allow viewers to optionally group movies belonging to the same TMDB collection into a single box-set card while browsing a movie library. A group appears only when at least two locally available and accessible movies belong to it; otherwise the movie remains an ordinary card. Opening the card shows the local members in TMDB collection order. Grouping is a reversible presentation choice and does not convert the movies into user-created collections or affect search, Continue Watching, Recently Added, or other item-level feeds. Each movie library has an administrator-owned default for all viewers, while profiles can override that default without changing the library configuration. The same collection order prevents personalized recommendations from surfacing a later sequel while an earlier accessible local movie remains unwatched.

User value / why v1

Franchise-heavy libraries become noisy and repetitive: eight Harry Potter films or several Mission: Impossible films occupy a large portion of the grid while representing one conceptual series. Automatic grouping makes these libraries easier to scan without requiring an administrator to manually create and maintain a collection for every franchise.

This belongs in v1 because it introduces a new browse entity and affects pagination, sorting, watch-state presentation, navigation, configuration precedence, and API behavior across every first-party client. Defining the server-owned grouping contract before the API lock prevents Android, Apple, and web clients from implementing incompatible client-side grouping or choosing different first-run defaults.

Expected behavior:

  • Group only when at least two local, accessible movies belong to the same TMDB collection.
  • Never fetch TMDB synchronously while browsing. Collection membership and artwork are stored during metadata matching or refresh.
  • If collection metadata is absent or stale, return the affected movies normally.
  • Opening a box set lists only movies present in the selected library; missing sequels are not advertised.
  • Search and personalized or chronological feeds continue returning individual movies.
  • Automatic groups remain distinct from personal and administrator-curated Collections.
  • The server performs grouping before pagination and returns deterministic ordering, totals, has_more, and snapshot behavior. Clients must not regroup catalog pages locally.
  • Each movie library has an admin-owned grouped or flat default that applies to profiles without an explicit override.
  • A profile can override the behavior globally or for one library. Removing an override returns to inheritance; the admin default is not an enforced policy.
  • Precedence is: profile-library override → profile override → admin library default → built-in product default.
  • Rollout should preserve the current flat view for existing profiles and libraries. Whether newly created movie libraries default to grouped browsing can be decided during design.

Recommendation sequencing

TMDB collection order is a constraint on algorithmic recommendations, not a reason to guarantee a franchise a recommendation slot.

  • Before personalized recommendation results are paginated, a candidate belonging to a TMDB collection is normalized to that collection's earliest locally available, accessible, unwatched member.
  • Example: if both The Terminator and Terminator 2 are available and the profile has watched neither, a score produced for Terminator 2 resolves to The Terminator. Once The Terminator is watched, Terminator 2 becomes eligible.
  • Earlier members that are not present in the library or are not accessible to the profile do not block a later member.
  • If the earliest unwatched member is in progress, suppress later members and let Continue Watching own the in-progress item.
  • Normal recommendation exclusions still apply. If the earliest unwatched member is excluded, suppress the collection candidate rather than skipping ahead to a sequel.
  • Multiple candidates from the same collection collapse onto the same earliest unwatched member and retain the strongest score.
  • Apply this to personalized recommendation surfaces and Watch Tonight, independently of the viewer's Browse grouping preference.
  • Do not apply it to search, ordinary catalog browsing, curated collections, or factual Popular, Trending, and Recently Added lists.

API surface

  • GET /api/v1/catalog/capabilities?library_id={library_id}

    • Advertises supported catalog grouping modes, including tmdb_collection.
    • Reports the selected library's configured default, the profile's effective value, and where that value came from.
    • Example:
      {
        "grouping_modes": ["work", "tmdb_collection"],
        "movie_collection_grouping": {
          "library_default": "grouped",
          "effective": "flat",
          "source": "profile_library"
        }
      }
    • source is one of profile_library, profile, library_default, or product_default.
    • Clients must feature-detect this rather than version-sniff or independently reproduce precedence.
  • GET /api/v1/catalog?...&group=tmdb_collection

    • Opts an existing movie-library catalog query into server-side grouping.
    • The response may contain ordinary movie entries and collection entries.
    • A collection entry uses type: "movie_collection" and includes:
      • content_id: stable synthetic identifier
      • tmdb_collection_id
      • title
      • poster_url / backdrop_url
      • member_count
      • played_count
      • canonical sort_metrics
    • A collection with fewer than two eligible members is returned as its individual movie.
    • Existing requests without group=tmdb_collection retain their current response.
  • POST /api/v1/catalog/query

    • Accepts additive group: "tmdb_collection" for complex catalog queries.
    • Uses the same response behavior as the grouped GET route.
  • GET /api/v1/catalog/movie-collections/{tmdb_collection_id}?library_id={library_id}

    • Returns collection metadata and its locally available, access-filtered movie items.
    • Members are returned in TMDB collection order.
    • Returns 404 when the collection has no accessible members in that library.
  • Existing personalized recommendation endpoints:

    • GET /api/v1/recommendations/similar/{item_id}
    • GET /api/v1/recommendations/for-you/main
    • GET /api/v1/recommendations/for-you/rows
    • GET /api/v1/recommendations/because-watched/{item_id}
    • GET /api/v1/recommendations/similar-users
    • GET /api/v1/recommendations/watch-tonight
    • GET /api/v1/recommendations/watch-tonight/cards
    • These routes apply collection-order normalization server-side after scoring and normal eligibility filtering, but before deduplication and pagination.
    • Existing response shapes remain usable: clients receive the normalized movie item and must not independently reorder collection members.
  • POST /api/v1/admin/libraries and PUT /api/v1/admin/libraries/{id}

    • Accept movie_collection_grouping_default: "grouped" | "flat" for movie libraries.
    • Non-movie libraries reject or ignore this field consistently rather than retaining an inapplicable value.
    • Library read responses expose the configured value so admin clients can render the control.
  • Existing typed settings API:

    • Add ui.movie_collection_grouping to GET /api/v1/settings/manifest.
    • Values: "grouped" or "flat".
    • Allowed scopes: profile and profile_library.
    • Resolution order: profile_library, profile, then the selected library's admin default and the built-in product default.
    • Clients read the effective result from the catalog capability response and write explicit overrides through:
      • PUT /api/v1/settings/values/ui.movie_collection_grouping?scope=profile_library&library_id={id}
    • Deleting the explicit value with the corresponding DELETE route restores inheritance.

Client impact (android / apple / web)

Recommendation sequencing is server-owned. All clients render the normalized movie returned by the recommendation endpoints; they do not need TMDB collection-order logic of their own.

Android

  • Add “Group movies into collections” to movie-library display controls on phone and TV.
  • Initialize the control from the server-resolved effective value and allow the viewer to restore the server default.
  • Request grouped catalog results when enabled.
  • Render and navigate into movie_collection entries.
  • Preserve predictable focus and back navigation on Android TV.
  • Continue rendering individual movies in search and personalized feeds.

Apple

  • Add the equivalent preference on iOS, tvOS, and macOS.
  • Initialize it from the server-resolved effective value and support returning to inherited behavior.
  • Render the collection card, aggregate watch state, and local-member detail view.
  • Preserve tvOS focus behavior and platform-standard back navigation.
  • Continue rendering individual movies outside the grouped library Browse surface.

Web

  • Add “Group movies into collections by default” to the admin editor for movie libraries.
  • Add the viewer toggle to movie-library Browse display controls, showing when the value is inherited and allowing “Use server default.”
  • Include explicit viewer choices in remembered library state without copying the inherited default into profile storage.
  • Render collection cards in the virtualized grid without client-side regrouping.
  • Add a collection detail view containing the locally available movies.
  • Keep the existing curated Collections tab unchanged.

Rough size (server-side)

M

AI Disclosure

  • Tool(s): Codex desktop
  • Model(s): gpt-5.6-sol
  • Involvement: AI-assisted; the user supplied the feature idea and reviewed the UX direction, while Codex inspected the existing Silo catalog, collection, library configuration, settings, and proposal contracts and drafted the issue.
  • Adversarial review: The draft was checked for hidden-title UX, single-item collections, inaccessible and missing members, synchronous TMDB dependency, pagination correctness, sorting ownership, admin/profile precedence, inheritance behavior, existing-profile rollout, capability detection, sequel-order normalization, in-progress suppression, unavailable predecessors, recommendation deduplication, and separation from curated collections.

Activity

  1. added
    v1.0-proposed
    on Aug 19, 2026
  2. added
    triaged
    and removed
    triaged
    on Sep 20, 2026
  3. geebru commented on Oct 12, 2026

    @geebru

    I'd be interested to see this take a JF approach where you can auto-collection box sets (currently via the TMDB boxsets plugin) but it doesn't automatically apply to browse views, but is an option for those that want to.

    I like the collection aspect, but don't use the option to condense to the single collection view in Library browsing.

  4. liam8888999 commented on Oct 13, 2026

    @liam8888999

    Giving this a bump. I think the way it's originally described in the post is ideal as movies from the same set could start with different letters causing you to have to keep going through the list to find it rather than just having x collection and then all being in there. I think since some people will not want it the best option would be to make it with an option to either be on or off but also showing the collection name in the ui with a way to click into that collection (I'd say you get tot he exact movie via search or something like that,sets should also appear as an option in search) and the api would be necessary for 3rd party client support

  5. stoleneggplant commented on Oct 19, 2026

    @stoleneggplant

    Having just 2 titles being in a collection may be too loose. An alternative is compare first and last titles, or exact matches. This way artwork and metadata matches the current collection, eg deadpool showing the title card for 1,2,3 or just 1,2 depending on what you have. Or in the case of Harry Potter if you’re missing one it will still group into the first/last for example.

    Just clarifying this is intended to group into library view as well yes?

  6. geebru commented on Oct 19, 2026

    @geebru

    Having just 2 titles being in a collection may be too loose.

    Just as a note, TMDB "creates" box sets for any film with at least 2 in its set so that tends to be where that number comes from. In the JF plugin I had my minimum count set to 3 instead, but I'd wager for API reasons the default would be 2 to match TMDB metadata.

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

    v1.0-proposed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions