* feat(metadata): add original-language preferences * fix(settings): show metadata exceptions immediately * docs(settings): add metadata language screenshot * fix(settings): make language exceptions responsive * fix(settings): standardize language display names
38 lines
1.2 KiB
Go
38 lines
1.2 KiB
Go
package access
|
|
|
|
// Scope is the resolved effective access policy for a viewer request.
|
|
type Scope struct {
|
|
UserID int
|
|
ProfileID string
|
|
AllowedLibraryIDs []int
|
|
DisabledLibraryIDs []int // user-disabled libraries (only set when AllowedLibraryIDs is nil)
|
|
LibrariesRestricted bool
|
|
MaxContentRating string
|
|
MaxPlaybackQuality string
|
|
// PreferredMetadataLanguage is the profile's metadata (presentation)
|
|
// language; "" inherits the library's metadata language.
|
|
PreferredMetadataLanguage string
|
|
// MetadataLanguageOverrides maps a media item's canonical original-language
|
|
// code to the profile's target metadata language for that source.
|
|
MetadataLanguageOverrides map[string]string
|
|
PolicyRevision int64
|
|
ProfileVerified bool
|
|
}
|
|
|
|
// ResolveInput is the request input for resolving a viewer access scope.
|
|
type ResolveInput struct {
|
|
UserID int
|
|
SessionID string
|
|
ProfileID string
|
|
ProfileToken string
|
|
SkipPINVerification bool
|
|
}
|
|
|
|
// ProfileTokenClaims are the claims embedded in a verified profile token.
|
|
type ProfileTokenClaims struct {
|
|
UserID int
|
|
SessionID string
|
|
ProfileID string
|
|
PolicyRevision int64
|
|
}
|