Skip to content

Commit ef213e5

Browse files
committed
feat: disable FLAC without PlayPlay
This is mainly to avoid people poking around and reporting it doesn't work.
1 parent ab178ff commit ef213e5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmd/daemon/main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414

1515
librespot "github.com/devgianlu/go-librespot"
1616
"github.com/devgianlu/go-librespot/mpris"
17+
"github.com/devgianlu/go-librespot/playplay"
1718

1819
"github.com/devgianlu/go-librespot/apresolve"
1920
"github.com/devgianlu/go-librespot/player"
@@ -110,6 +111,12 @@ func NewApp(cfg *Config) (app *App, err error) {
110111
app.clientToken = cfg.ClientToken
111112
}
112113

114+
if cfg.FlacEnabled && !playplay.Plugin.IsSupported() {
115+
// FLAC decryption keys are available only with the PlayPlay DRM implementation.
116+
// Using PlayPlay might get you banned by Spotify.
117+
return nil, fmt.Errorf("FLAC playback requires a PlapPlay implementation")
118+
}
119+
113120
return app, nil
114121
}
115122

0 commit comments

Comments
 (0)