mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-15 13:57:09 +02:00
docs(jellyfin): clarify public image endpoint and accessibleLibraryIDs comments
This commit is contained in:
parent
106a1e2501
commit
46f3b4dbc8
2 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue