mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-28 02:16:16 +00:00
Implemented reset settings and added missing options
Tags selection not added yet
This commit is contained in:
parent
30ceca014a
commit
85f103066c
8
app.py
8
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()
|
||||
|
||||
|
|
|
@ -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})
|
||||
|
|
Loading…
Reference in a new issue