Skip to main content

Module exclusions

Module exclusions 

Source
Expand description

User-chosen browsing exclusions (UR-076 / DR-209). Library folders the user has chosen to keep out of browsing.

Some people file things inside a library that they never want to see while browsing it — a “Podcasts” folder sitting in the music library is the canonical case: its albums and tracks leak into album, artist, track and playlist listings even though the user thinks of them as a different medium.

This is a domain rule, not a presentation one: what an item belongs to, and therefore whether a query should return it, is decided here in the repository layer so every query path agrees. The predecessor of this module was a frontend filter that dropped anything literally named “Podcasts” — one user’s folder layout, keyed on an English string, shipped to everyone. Excluding by id instead of name is what makes the setting survive a rename, a translation, or two folders sharing a name.

The excluded set is process-wide rather than a field on a repository for the same reason as online::STREAMING_QUALITY: it is a preference about this user’s browsing, not about a server session, so it must survive a repository being rebuilt on re-login. It is written by the settings command and restored from the database at startup.

TRACES: UR-076 | DR-209

Statics§

EXCLUDED_IDS 🔒
Ids (normalised — see normalise_id) of items the user has hidden.

Traits§

ExcludeHidden
Drop the user’s hidden items from a repository result.

Functions§

excluded_item_ids
The excluded set as currently applied, normalised.
excluded_snapshot 🔒
Snapshot of the excluded set, taken once per list so a long listing does not re-lock per item.
is_excluded_by
Whether item falls under one of excluded.
normalise_id 🔒
Jellyfin writes the same GUID both dashed and undashed depending on the endpoint, and ids arriving over IPC may carry stray whitespace. Comparing a canonical form means a stored id keeps matching whichever spelling a query happens to return.
set_excluded_item_ids
Replace the excluded set. Ids are normalised, de-duplicated and blanks dropped, so a malformed value can never hide more than it names.