🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Disable creation of shares when feature is disabled.
Deluane2ea5eba8cbb
diff --git a/server/nativeapi/native_api.go b/server/nativeapi/native_api.goindex 499f617b3..8caa2d563 100644--- a/server/nativeapi/native_api.go+++ b/server/nativeapi/native_api.go@@ -45,7 +45,9 @@ func (n *Router) routes() http.Handler {n.R(r, "/playlist", model.Playlist{}, true)n.R(r, "/transcoding", model.Transcoding{}, conf.Server.EnableTranscodingConfig)n.R(r, "/radio", model.Radio{}, true)- n.RX(r, "/share", n.share.NewRepository, true)+ if conf.Server.DevEnableShare {+ n.RX(r, "/share", n.share.NewRepository, true)+ }n.addPlaylistTrackRoute(r)diff --git a/ui/src/common/SongBulkActions.js b/ui/src/common/SongBulkActions.jsindex b835dabc4..8218139bd 100644--- a/ui/src/common/SongBulkActions.js+++ b/ui/src/common/SongBulkActions.js@@ -7,6 +7,7 @@ import { BatchPlayButton } from './index'import { AddToPlaylistButton } from './AddToPlaylistButton'import { makeStyles } from '@material-ui/core/styles'import { BatchShareButton } from './BatchShareButton'+import config from '../config'const useStyles = makeStyles((theme) => ({button: {@@ -43,7 +44,9 @@ export const SongBulkActions = (props) => {icon={<RiPlayListAddFill />}className={classes.button}/>- <BatchShareButton {...props} className={classes.button} />+ {config.devEnableShare && (+ <BatchShareButton {...props} className={classes.button} />+ )}<AddToPlaylistButton {...props} className={classes.button} /></Fragment>)