navidrome/plugins/manifest.go
Deluan c6fe02a49c feat: add support for experimental WebAssembly threads
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-01 13:19:52 -05:00

18 lines
630 B
Go

package plugins
//go:generate go tool go-jsonschema -p plugins --struct-name-from-title -o manifest_gen.go manifest-schema.json
// AllowedHosts returns a list of allowed hosts for HTTP requests.
// Returns the hosts directly from the manifest's permissions.
func (m *Manifest) AllowedHosts() []string {
if m.Permissions == nil || m.Permissions.Http == nil {
return nil
}
return m.Permissions.Http.AllowedHosts
}
// HasExperimentalThreads returns true if the manifest requests experimental threads support.
func (m *Manifest) HasExperimentalThreads() bool {
return m.Experimental != nil && m.Experimental.Threads != nil
}