Skip to content

Catalog item API ignores library_id when returning media versions #1032

Closed

Description

@Quick104

Discord: https://discord.com/channels/1487838737248292864/1545800869205770310
Author: srbgod

Goal

Keep item details and media versions scoped to the library being browsed.

Steps

  1. Create two movie libraries containing different files for the same movie (same canonical content ID).
  2. Use a profile that can access both libraries.
  3. Browse the second library and open the shared movie.
  4. Inspect GET /api/v1/catalog/items/{id}?library_id={second_library_id}
  5. Check returned versions/media files and Media locations in the web UI.

Expected

When library_id is supplied, the API response should contain only media files belonging to that library.

Actual

The API returns media files from both accessible libraries. The web UI displays versions/locations from the other library.

What is slow/broken

Library scoping in the catalog item API and item details in the web UI.

Scope

Consistent when the same canonical movie exists in multiple libraries accessible to the profile. Catalog membership per library is correct; problem is files returned for an individual item.

Version/branch

Official upstream main, commit 3131494, image build-535.

Deployment

ghcr.io/silo-server/silo-server:latest

Technical notes

Web client preserves selected library and sends library_id correctly. Backend parses into AccessFilter.PresentationLibraryID and validates item membership, but FilterMediaFilesByAccess does not apply PresentationLibraryID when filtering the item's files.

Activity

  1. added
    bug
    triaged
    and removed
    triaged
    on Sep 20, 2026
  2. added theissue type on Sep 20, 2026
  3. removed
    bug
    on Sep 20, 2026
  4. Quick104 commented on Oct 23, 2026

    @Quick104
    ContributorAuthor

    Fixed on main by #1111. It adds the catalog.scope_versions_to_library admin setting, which limits item and version reads to the browsed library_id.

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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions