diff --git a/app.py b/app.py index 6721618..97372a7 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,6 @@ from deemix.app.queuemanager import addToQueue, removeFromQueue, getQueue, cancelAllDownloads, removeFinishedDownloads from deemix.utils.misc import getTypeFromLink, getIDFromLink -from deemix.app.settings import initSettings, getSettings, saveSettings +from deemix.app.settings import initSettings, getSettings, getDefaultSettings, saveSettings from deemix.app.spotify import SpotifyHelper settings = {} @@ -15,7 +15,9 @@ def getUser(dz): def initialize(): global settings global spotifyHelper + global defaultSettings settings = initSettings() + defaultSettings = getDefaultSettings() spotifyHelper = SpotifyHelper() @@ -80,6 +82,10 @@ def analyzeLink(dz, link): return (type, data) # Settings functions +def getDefaultSettings_link(): + return defaultSettings + + def getSettings_link(): return getSettings() diff --git a/server.py b/server.py index a8e60b2..16ab210 100644 --- a/server.py +++ b/server.py @@ -65,7 +65,8 @@ def on_connect(): session['dz'] = Deezer() settings = app.getSettings_link() spotifyCredentials = app.getSpotifyCredentials() - emit('init_settings', (settings, spotifyCredentials)) + defaultSettings = app.getDefaultSettings_link() + emit('init_settings', (settings, spotifyCredentials, defaultSettings)) queue, queueComplete, queueList, currentItem = app.getQueue_link() emit('init_downloadQueue', {'queue': queue, 'queueComplete': queueComplete, 'queueList': queueList, 'currentItem': currentItem})