fyne update. able to choose to display cover or not

This commit is contained in:
aynakeya
2024-07-24 20:24:42 +08:00
parent 5480ebdd86
commit c5d3fb407b
4 changed files with 23 additions and 19 deletions

View File

@@ -7,8 +7,9 @@ import (
)
type playerConfig struct {
Volume float64
AudioDevice string
Volume float64
AudioDevice string
DisplayMusicCover bool
}
func (p *playerConfig) Name() string {
@@ -24,7 +25,8 @@ func (p *playerConfig) OnSave() {
}
var cfg = &playerConfig{
Volume: 100,
Volume: 100,
DisplayMusicCover: true,
}
func restoreConfig() {

View File

@@ -212,7 +212,7 @@ func registerCmdHandler() {
})
log.Debugf("mpv command loadfile %s %s", mediaInfo.Title, mediaUrl.Url)
cmd := []string{"loadfile", mediaUrl.Url}
if media.Info.Cover.Url != "" {
if cfg.DisplayMusicCover && media.Info.Cover.Url != "" {
// add media cover to video channel.
// https://mpv.io/manual/master/#command-interface-[<options>]]]
// api changes after client version 2.3 (0.38.0