Skip to content

Commit

Permalink
Merge pull request #333 from adamantike/fix/mpris-broken-art-url-on-l…
Browse files Browse the repository at this point in the history
…inux

fix: MPRIS broken cover art on Linux
  • Loading branch information
dweymouth authored Feb 24, 2024
2 parents 307fbdf + 2175122 commit 6a9f488
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ func (a *App) setupMPV() error {

func (a *App) setupMPRIS(mprisAppName string) {
a.MPRISHandler = NewMPRISHandler(mprisAppName, a.PlaybackManager)
a.MPRISHandler.ArtURLLookup = a.ImageManager.GetCoverArtUrl
a.MPRISHandler.ArtURLLookup = func(id string) (string, error) {
a.ImageManager.GetCoverThumbnail(id) // ensure image is cached locally
return a.ImageManager.GetCoverArtUrl(id)
}
a.MPRISHandler.OnRaise = func() error { a.callOnReactivate(); return nil }
a.MPRISHandler.OnQuit = func() error {
if a.OnExit == nil {
Expand Down

0 comments on commit 6a9f488

Please sign in to comment.