Pass ack back on add to queue

This commit is contained in:
kermit 2020-09-14 15:58:33 +01:00
parent 4e003c5698
commit e0ebffac8c
2 changed files with 3 additions and 3 deletions

4
app.py
View file

@ -137,10 +137,10 @@ class deemix:
return dz.search(term, type, nb, start)
# Queue functions
def addToQueue(self, dz, url, bitrate=None, interface=None):
def addToQueue(self, dz, url, bitrate=None, interface=None, ack=None):
if ';' in url:
url = url.split(";")
self.qm.addToQueue(dz, url, self.set.settings, bitrate, interface)
self.qm.addToQueue(dz, url, self.set.settings, bitrate, interface, ack)
def removeFromQueue(self, uuid, interface=None):

View file

@ -251,7 +251,7 @@ def queueRestored():
@socketio.on('addToQueue')
def addToQueue(data):
result = app.addToQueue(session['dz'], data['url'], data['bitrate'], interface=socket_interface)
result = app.addToQueue(session['dz'], data['url'], data['bitrate'], interface=socket_interface, ack=data.get('ack'))
if result == "Not logged in":
emit('loginNeededToDownload')