renamed spotify/settings.json into spotify/config.json
This commit is contained in:
parent
5ec49663e3
commit
add5158022
|
@ -304,15 +304,15 @@ class Spotify(Plugin):
|
||||||
return deezerPlaylist
|
return deezerPlaylist
|
||||||
|
|
||||||
def loadSettings(self):
|
def loadSettings(self):
|
||||||
if not (self.configFolder / 'settings.json').is_file():
|
if not (self.configFolder / 'config.json').is_file():
|
||||||
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)
|
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:
|
try:
|
||||||
settings = json.load(settingsFile)
|
settings = json.load(settingsFile)
|
||||||
except json.decoder.JSONDecodeError:
|
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)
|
json.dump({**self.credentials, **self.settings}, f, indent=2)
|
||||||
settings = deepcopy({**self.credentials, **self.settings})
|
settings = deepcopy({**self.credentials, **self.settings})
|
||||||
except Exception:
|
except Exception:
|
||||||
|
@ -324,7 +324,7 @@ class Spotify(Plugin):
|
||||||
def saveSettings(self, newSettings=None):
|
def saveSettings(self, newSettings=None):
|
||||||
if newSettings: self.setSettings(newSettings)
|
if newSettings: self.setSettings(newSettings)
|
||||||
self.checkCredentials()
|
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)
|
json.dump({**self.credentials, **self.settings}, f, indent=2)
|
||||||
|
|
||||||
def getSettings(self):
|
def getSettings(self):
|
||||||
|
|
Loading…
Reference in New Issue