Repository navigation
Description
Problem
When a client receives a media item from a mixed-library API surface, the response does not consistently identify which library or libraries contain that item.
This makes it harder for client integrations to preserve the right library context when opening an item or making follow-up API requests. The problem affects more than explicit library browsing: the same item cards can appear in search results, For You, Discover, Recently Added, and Home or other recommendation sections.
Include library membership information on each catalog item returned by the API, consistently across browse, search, home, and discovery endpoints.
For example, an item response could include:
{
"content_id": "movie:heat-1995",
"library_id": "3",
"library_ids": ["3", "7"]
}library_id provides a useful single library context for the item. On a library-scoped response, it should identify the library being browsed. On a mixed-library response, its selection should be deterministic.
library_ids lists all libraries containing the item that the current viewer is allowed to access. This is important because the same item may be present in more than one library.
These names are a suggested response shape; maintainers can adjust them to fit the existing API conventions.
Where this should apply
The library information should be included consistently on item cards from API v2 surfaces such as:
Catalog browse and search, including section-based results
For You and other recommendation/discovery rows
Recently Added, Popular, Discover, and Similar items
Home-page sections and library/section views
It should cover supported media types, including TV episodes and seasons, rather than only movies and series.
Why this would help
Clients can reliably associate results with their source library without making extra per-item requests or guessing from the item type or current page. Returning all accessible memberships also avoids losing information when an item appears in multiple libraries.
Additional context
This request concerns the library IDs associated with each returned item, not analytics about which library a user searched. It should be implemented as part of the shared catalog-item response contract so the fields remain consistent across endpoints.
Who it affects
anyone who uses the api from the server
Current workaround
recursively search through all the libraries for the content id
Proposed behavior
A client can determine the library context for an item regardless of which of these surfaces returned it.
An item belonging to multiple libraries remains a single result where it is currently represented as one catalog item; its memberships are reported in the response rather than duplicating the card.
On a library-scoped response, library_id matches the library context of that request.
For mixed-library responses, library_id is chosen consistently, and library_ids provides the complete set of visible memberships.
Only enabled libraries the current viewer is permitted to access are returned. Disabled or inaccessible library IDs must not leak through these fields.
If no visible membership can be determined, the API omits the relevant field(s) rather than inventing an ID.
The change is additive and does not alter existing item IDs, result ordering, recommendation ranking, or playback behaviour.
Alternatives considered
No response
AI harness
chatgpt
AI tool(s)
chatgpt
AI model(s)
chatgpt
AI involvement
Fully AI-generated, human verified
Independent or adversarial review
n/a
Confirmations
- I searched open and closed issues, including ones closed as not planned, and this is not already requested
- This is not one of Silo's non-goals
Activity