exclude C source files from non-darwin targets

This commit is contained in:
zackslash
2023-10-19 17:59:24 +01:00
parent e938d62cb3
commit e191bf0d9f
3 changed files with 10 additions and 4 deletions
+6 -4
View File
@@ -235,10 +235,12 @@ func (a *App) setupMPRIS(mprisAppName string) {
func (a *App) setupMPMedia() {
a.MPMediaHandler = NewMPMediaHandler(a.Player, a.PlaybackManager)
a.MPMediaHandler.ArtURLLookup = func(coverID string) (string, error) {
// artwork needs to be in cache before playback, so cover is retrieved in advance.
a.ImageManager.GetCoverThumbnail(coverID)
return a.ImageManager.GetCoverArtUrl(coverID)
if a.MPMediaHandler != nil {
a.MPMediaHandler.ArtURLLookup = func(coverID string) (string, error) {
// artwork needs to be in cache before playback, so cover is retrieved in advance.
a.ImageManager.GetCoverThumbnail(coverID)
return a.ImageManager.GetCoverArtUrl(coverID)
}
}
}
+2
View File
@@ -1,3 +1,5 @@
//go:build darwin
/**
* mpmediabridge.h
*
+2
View File
@@ -1,3 +1,5 @@
//go:build darwin
#import "mpmediabridge.h"
/**