Implemented reset settings and added missing options
Tags selection not added yet
This commit is contained in:
parent
6b8650c9af
commit
5cffc597fe
|
@ -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
|
||||||
- ?
|
- ?
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue