Skip to content

🎧 Your Personal Streaming Service

Remove unused feature toggles

Deluanc742ae08434d
diff --git a/conf/configuration.go b/conf/configuration.go
index b2de92da6..7a52b7c83 100644
--- a/conf/configuration.go
+++ b/conf/configuration.go
@@ -36,15 +36,13 @@ type nd struct {
// DevFlags. These are used to enable/disable debugging and incomplete features
DevLogSourceLine bool `default:"false"`
DevAutoCreateAdminPassword string `default:""`
- DevEnableUIPlaylists bool `default:"true"`
- DevEnableUIStarred bool `default:"true"`
}
var Server = &nd{}
// TODO refactor configuration and use something different. Maybe https://github.com/spf13/cobra
-// This function loads the config just load the ConfigFile. This is very cumbersome, but doesn't
-// seem there's a simpler way to do thiswith multiconfig. Time to replace this library?
+// This function loads the whole config just to get the ConfigFile. This is very cumbersome, but doesn't
+// seem there's a simpler way to do this with multiconfig. Time to replace this library?
func configFile() string {
conf := &nd{}
loader := multiconfig.MultiLoader(
diff --git a/server/app/serve_index.go b/server/app/serve_index.go
index 7a43caf8d..7a5948d12 100644
--- a/server/app/serve_index.go
+++ b/server/app/serve_index.go
@@ -30,8 +30,6 @@ func ServeIndex(ds model.DataStore, fs http.FileSystem) http.HandlerFunc {
"baseURL": strings.TrimSuffix(conf.Server.BaseURL, "/"),
"loginBackgroundURL": conf.Server.UILoginBackgroundURL,
"enableTranscodingConfig": conf.Server.EnableTranscodingConfig,
- "enablePlaylists": conf.Server.DevEnableUIPlaylists,
- "enableStarred": conf.Server.DevEnableUIStarred,
}
j, err := json.Marshal(appConfig)
if err != nil {
diff --git a/ui/src/App.js b/ui/src/App.js
index 0eb50950f..52ea5a0ff 100644
--- a/ui/src/App.js
+++ b/ui/src/App.js
@@ -14,7 +14,6 @@ import artist from './artist'
import playlist from './playlist'
import { Player, playQueueReducer } from './audioplayer'
import { albumViewReducer } from './album/albumState'
-import config from './config'
import customRoutes from './routes'
import themeReducer from './personal/themeReducer'
import { addToPlaylistDialogReducer } from './dialogs/dialogState'
@@ -50,13 +49,11 @@ const App = () => (
<Resource name="album" {...album} options={{ subMenu: 'library' }} />,
<Resource name="artist" {...artist} options={{ subMenu: 'library' }} />,
<Resource name="song" {...song} options={{ subMenu: 'library' }} />,
- config.enablePlaylists && (
- <Resource
- name="playlist"
- {...playlist}
- options={{ subMenu: 'library' }}
- />
- ),
+ <Resource
+ name="playlist"
+ {...playlist}
+ options={{ subMenu: 'library' }}
+ />,
permissions === 'admin' ? (
<Resource name="user" {...user} options={{ subMenu: 'settings' }} />
) : null,
diff --git a/ui/src/common/SongContextMenu.js b/ui/src/common/SongContextMenu.js
index 34eb83ade..4e8c5ca09 100644
--- a/ui/src/common/SongContextMenu.js
+++ b/ui/src/common/SongContextMenu.js
@@ -8,7 +8,6 @@ import MoreVertIcon from '@material-ui/icons/MoreVert'
import StarIcon from '@material-ui/icons/Star'
import StarBorderIcon from '@material-ui/icons/StarBorder'
import { addTracks, setTrack } from '../audioplayer'
-import config from '../config'
import { openAddToPlaylist } from '../dialogs/dialogState'
const useStyles = makeStyles({
@@ -100,7 +99,7 @@ const SongContextMenu = ({
return (
<span className={classes.noWrap}>
- {config.enableStarred && showStar && (
+ {showStar && (
<IconButton
onClick={handleToggleStar}
size={'small'}
diff --git a/ui/src/config.js b/ui/src/config.js
index bd6adb0f7..513f8d660 100644
--- a/ui/src/config.js
+++ b/ui/src/config.js
@@ -7,8 +7,6 @@ const defaultConfig = {
baseURL: '',
loginBackgroundURL: 'https://source.unsplash.com/random/1600x900?music',
enableTranscodingConfig: true,
- enablePlaylists: true,
- enableStarred: true,
}
let config