mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-15 07:44:01 -04:00
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
29 lines
807 B
Go
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
|
|
}
|