🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Add option to disable track cover art. Should help with cloud mounting (rclone)
Deluand913108de28d
diff --git a/conf/configuration.go b/conf/configuration.goindex 92a3979f0..6566b0915 100644--- a/conf/configuration.go+++ b/conf/configuration.go@@ -49,6 +49,7 @@ type configOptions struct {DevLogSourceLine boolDevAutoCreateAdminPassword stringDevPreCacheAlbumArtwork bool+ DevDisableTrackCoverArt boolDevNewCacheLayout bool}@@ -136,6 +137,7 @@ func init() {viper.SetDefault("devautocreateadminpassword", "")viper.SetDefault("devprecachealbumartwork", false)viper.SetDefault("devnewcachelayout", false)+ viper.SetDefault("devdisabletrackcoverart", false)}func InitConfig(cfgFile string) {diff --git a/core/artwork.go b/core/artwork.goindex 0c5f0e791..5de3e8fd6 100644--- a/core/artwork.go+++ b/core/artwork.go@@ -98,7 +98,7 @@ func (a *artwork) getImagePath(ctx context.Context, id string) (path string, laslog.Trace(ctx, "Looking for media file art", "id", id)- // Check if id is a mediaFile cover id+ // Check if id is a mediaFile idvar mf *model.MediaFilemf, err = a.ds.MediaFile(ctx).Get(id)@@ -110,8 +110,8 @@ func (a *artwork) getImagePath(ctx context.Context, id string) (path string, lasreturn}- // If it is a mediaFile and it has cover art, return it- if mf.HasCoverArt {+ // If it is a mediaFile and it has cover art, return it (if feature is disabled, skip)+ if !conf.Server.DevDisableTrackCoverArt && mf.HasCoverArt {return mf.Path, mf.UpdatedAt, nil}