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 - Write the API Documentation
WebUI: WebUI:
- Link Analyzer
- Stylize and separate the options in the Settings tab - Stylize and separate the options in the Settings tab
- Home tab - Home tab
- Charts tab
- Favorites / Playlists tab - Favorites / Playlists tab
- About Section - About Section
- Reset settings to default
- Animations and style polishing - Animations and style polishing
- ? - ?

View File

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