renamed spotify/settings.json into spotify/config.json

This commit is contained in:
RemixDev 2021-12-21 15:35:12 +01:00
parent 5ec49663e3
commit add5158022
No known key found for this signature in database
GPG Key ID: B33962B465BDB51C
1 changed files with 5 additions and 5 deletions

View File

@ -304,15 +304,15 @@ class Spotify(Plugin):
return deezerPlaylist
def loadSettings(self):
if not (self.configFolder / 'settings.json').is_file():
with open(self.configFolder / 'settings.json', 'w', encoding="utf-8") as f:
if not (self.configFolder / 'config.json').is_file():
with open(self.configFolder / 'config.json', 'w', encoding="utf-8") as f:
json.dump({**self.credentials, **self.settings}, f, indent=2)
with open(self.configFolder / 'settings.json', 'r', encoding="utf-8") as settingsFile:
with open(self.configFolder / 'config.json', 'r', encoding="utf-8") as settingsFile:
try:
settings = json.load(settingsFile)
except json.decoder.JSONDecodeError:
with open(self.configFolder / 'settings.json', 'w', encoding="utf-8") as f:
with open(self.configFolder / 'config.json', 'w', encoding="utf-8") as f:
json.dump({**self.credentials, **self.settings}, f, indent=2)
settings = deepcopy({**self.credentials, **self.settings})
except Exception:
@ -324,7 +324,7 @@ class Spotify(Plugin):
def saveSettings(self, newSettings=None):
if newSettings: self.setSettings(newSettings)
self.checkCredentials()
with open(self.configFolder / 'settings.json', 'w', encoding="utf-8") as f:
with open(self.configFolder / 'config.json', 'w', encoding="utf-8") as f:
json.dump({**self.credentials, **self.settings}, f, indent=2)
def getSettings(self):