docs(jellyfin): clarify public image endpoint and accessibleLibraryIDs comments

This commit is contained in:
Deluan 2026-07-05 17:57:53 -04:00
commit 46f3b4dbc8
2 changed files with 4 additions and 4 deletions

View file

@ -50,8 +50,8 @@ func (api *Router) routes() http.Handler {
r.Post("/Users/AuthenticateByName", api.authenticateByName)
r.Get("/Users/Public", api.getPublicUsers)
// Images are intentionally public and not library-scoped: artwork isn't sensitive media
// content, and clients (e.g. Finamp) load it via <img> tags with only ?api_key= in the URL.
// Images are intentionally fully public and do not require authentication: artwork isn't
// sensitive media content, and this matches Jellyfin's lenient image handling.
r.Get("/Items/{itemId}/Images/{type}", api.getItemImage)
r.Get("/Items/{itemId}/Images/{type}/{index}", api.getItemImage)

View file

@ -8,8 +8,8 @@ import (
)
// accessibleLibraryIDs returns the ids of the libraries the current user can access. An
// empty result means "no restriction" (e.g. admins), which matches the no-op semantics of
// filter.ApplyLibraryFilter/ApplyArtistLibraryFilter for an empty id list.
// empty slice only occurs for the edge case of a non-admin user with no assigned libraries;
// filter.ApplyLibraryFilter/ApplyArtistLibraryFilter treat it as a no-op (unrestricted).
func accessibleLibraryIDs(ctx context.Context) []int {
u, _ := request.UserFrom(ctx)
return u.Libraries.IDs()