diff --git a/requirements.txt b/requirements.txt index d6715e1..e7c0878 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -deemix +deemix==1.0.6 flask flask-socketio pywebview diff --git a/server.py b/server.py index 2f5fd86..149c760 100644 --- a/server.py +++ b/server.py @@ -104,26 +104,32 @@ def on_connect(): @socketio.on('login') -def login(arl, force=False): +def login(arl, force=False, child=0): global firstConnection emit('toast', {'msg': "Logging in...", 'icon': 'loading', 'dismiss': False, 'id': "login-toast"}) if not session['dz'].logged_in: - result = session['dz'].login_via_arl(arl) + result = session['dz'].login_via_arl(arl, child) else: if force: session['dz'] = Deezer() - result = session['dz'].login_via_arl(arl) + result = session['dz'].login_via_arl(arl, child) if result == 1: result = 3 else: result = 2 emit('logged_in', {'status': result, 'arl': arl, 'user': session['dz'].user}) + emit('familyAccounts', session['dz'].childs) emit('init_favorites', app.getUserFavorites(session['dz'])) if firstConnection and result in [1, 3]: firstConnection = False app.loadDownloadQueue(session['dz'], socket_interface) +@socketio.on('changeAccount') +def changeAccount(child): + emit('accountChanged', session['dz'].change_account(child)) + emit('init_favorites', app.getUserFavorites(session['dz'])) + @socketio.on('logout') def logout(): diff --git a/webui b/webui index 7695632..379ab34 160000 --- a/webui +++ b/webui @@ -1 +1 @@ -Subproject commit 7695632a6701c1d860af3d2447ea13e9e515d18b +Subproject commit 379ab344ef3012429b82fc1fd4d50ad7f90cfaa7