mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-28 18:36:07 +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.app.queuemanager import addToQueue, removeFromQueue, getQueue, cancelAllDownloads, removeFinishedDownloads
|
||||||
from deemix.utils.misc import getTypeFromLink, getIDFromLink
|
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
|
from deemix.app.spotify import SpotifyHelper
|
||||||
|
|
||||||
settings = {}
|
settings = {}
|
||||||
|
@ -15,7 +15,9 @@ def getUser(dz):
|
||||||
def initialize():
|
def initialize():
|
||||||
global settings
|
global settings
|
||||||
global spotifyHelper
|
global spotifyHelper
|
||||||
|
global defaultSettings
|
||||||
settings = initSettings()
|
settings = initSettings()
|
||||||
|
defaultSettings = getDefaultSettings()
|
||||||
spotifyHelper = SpotifyHelper()
|
spotifyHelper = SpotifyHelper()
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,6 +82,10 @@ def analyzeLink(dz, link):
|
||||||
return (type, data)
|
return (type, data)
|
||||||
|
|
||||||
# Settings functions
|
# Settings functions
|
||||||
|
def getDefaultSettings_link():
|
||||||
|
return defaultSettings
|
||||||
|
|
||||||
|
|
||||||
def getSettings_link():
|
def getSettings_link():
|
||||||
return getSettings()
|
return getSettings()
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,8 @@ def on_connect():
|
||||||
session['dz'] = Deezer()
|
session['dz'] = Deezer()
|
||||||
settings = app.getSettings_link()
|
settings = app.getSettings_link()
|
||||||
spotifyCredentials = app.getSpotifyCredentials()
|
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()
|
queue, queueComplete, queueList, currentItem = app.getQueue_link()
|
||||||
emit('init_downloadQueue',
|
emit('init_downloadQueue',
|
||||||
{'queue': queue, 'queueComplete': queueComplete, 'queueList': queueList, 'currentItem': currentItem})
|
{'queue': queue, 'queueComplete': queueComplete, 'queueList': queueList, 'currentItem': currentItem})
|
||||||
|
|
Loading…
Reference in a new issue