Files
bbedward f482642880 sysupdate: check only on demand, run at low priority, fix the settings page
scrollbar: interface style toggle and no scrollbars in the dash
dash: never allow scrollbars
cc: widget sheet cards, header close button and content-sized dialogs
2026-09-29 16:30:04 -04:00

29 lines
807 B
Go

package plugins
import "path/filepath"
type LyricsProvider struct {
Command string `json:"command"`
Name string `json:"name"`
URL string `json:"url"`
WordSync bool `json:"wordSync"`
}
// LyricsProvider reads an installed plugin's lyrics block, with Command made absolute.
func (m *Manager) LyricsProvider(pluginID string) (LyricsProvider, bool) {
path, err := m.findInstalledPath(pluginID)
if err != nil || path == "" {
return LyricsProvider{}, false
}
manifest := m.getPluginManifest(path)
if manifest == nil || manifest.Lyrics == nil || manifest.Lyrics.Command == "" {
return LyricsProvider{}, false
}
provider := *manifest.Lyrics
provider.Command = filepath.Join(path, provider.Command)
if provider.Name == "" {
provider.Name = manifest.Name
}
return provider, true
}