diff --git a/server/serve_index.go b/server/serve_index.go
index fae937597..e521edd4e 100644
--- a/server/serve_index.go
+++ b/server/serve_index.go
@@ -62,6 +62,7 @@ func serveIndex(ds model.DataStore, fs fs.FS, shareInfo *model.Share) http.Handl
"lastFMApiKey": conf.Server.LastFM.ApiKey,
"devShowArtistPage": conf.Server.DevShowArtistPage,
"listenBrainzEnabled": conf.Server.ListenBrainz.Enabled,
+ "enableExternalServices": conf.Server.EnableExternalServices,
"enableReplayGain": conf.Server.EnableReplayGain,
"defaultDownsamplingFormat": conf.Server.DefaultDownsamplingFormat,
}
diff --git a/server/serve_index_test.go b/server/serve_index_test.go
index 46f9c54cf..a714c83c3 100644
--- a/server/serve_index_test.go
+++ b/server/serve_index_test.go
@@ -310,6 +310,17 @@ var _ = Describe("serveIndex", func() {
Expect(config).To(HaveKeyWithValue("enableReplayGain", true))
})
+ It("sets the enableExternalServices", func() {
+ conf.Server.EnableExternalServices = true
+ r := httptest.NewRequest("GET", "/index.html", nil)
+ w := httptest.NewRecorder()
+
+ serveIndex(ds, fs, nil)(w, r)
+
+ config := extractAppConfig(w.Body.String())
+ Expect(config).To(HaveKeyWithValue("enableExternalServices", true))
+ })
+
Describe("loginBackgroundURL", func() {
Context("empty BaseURL", func() {
BeforeEach(func() {
diff --git a/ui/src/album/AlbumDetails.js b/ui/src/album/AlbumDetails.js
index 3ab8c5ae6..e52749f48 100644
--- a/ui/src/album/AlbumDetails.js
+++ b/ui/src/album/AlbumDetails.js
@@ -304,7 +304,9 @@ const AlbumDetails = (props) => {
)}
{!isXsmall && (
-
+ {config.enableExternalServices && (
+
+ )}
)}
{isDesktop && (
diff --git a/ui/src/artist/DesktopArtistDetails.js b/ui/src/artist/DesktopArtistDetails.js
index 296268262..d49eff8fd 100644
--- a/ui/src/artist/DesktopArtistDetails.js
+++ b/ui/src/artist/DesktopArtistDetails.js
@@ -135,7 +135,9 @@ const DesktopArtistDetails = ({ artistInfo, record, biography }) => {
-
+ {config.enableExternalServices && (
+
+ )}
{isLightboxOpen && (
diff --git a/ui/src/config.js b/ui/src/config.js
index 06056a180..8b9a65e6c 100644
--- a/ui/src/config.js
+++ b/ui/src/config.js
@@ -25,6 +25,7 @@ const defaultConfig = {
lastFMEnabled: true,
lastFMApiKey: '9b94a5515ea66b2da3ec03c12300327e',
listenBrainzEnabled: true,
+ enableExternalServices: true,
enableCoverAnimation: true,
devShowArtistPage: true,
enableReplayGain: true,