Implemented reset settings and added missing options

Tags selection not added yet
This commit is contained in:
RemixDev 2020-05-03 16:21:37 +02:00
parent 6b8650c9af
commit 5cffc597fe
2 changed files with 6 additions and 3 deletions

View file

@ -24,13 +24,10 @@ Library:
- Write the API Documentation
WebUI:
- Link Analyzer
- Stylize and separate the options in the Settings tab
- Home tab
- Charts tab
- Favorites / Playlists tab
- About Section
- Reset settings to default
- Animations and style polishing
- ?

View file

@ -18,6 +18,7 @@ def initSettings():
mkdir(configFolder)
with open(path.join(currentFolder, 'default.json'), 'r') as d:
defaultSettings = json.load(d)
defaultSettings['downloadLocation'] = path.join(localpaths.getHomeFolder(), 'deemix Music')
if not path.isfile(path.join(configFolder, 'config.json')):
with open(path.join(configFolder, 'config.json'), 'w') as f:
json.dump(defaultSettings, f, indent=2)
@ -37,6 +38,11 @@ def getSettings():
return settings
def getDefaultSettings():
global defaultSettings
return defaultSettings
def saveSettings(newSettings):
global settings
settings = newSettings