Merge pull request 'Pass back user specified ack on addToQueue' (#43) from kermit/deemix:ack into main
Reviewed-on: https://codeberg.org/RemixDev/deemix/pulls/43
This commit is contained in:
commit
b91c12b858
|
@ -32,6 +32,7 @@ class QueueItem:
|
|||
self.progress = 0
|
||||
self.uuid = f"{self.type}_{self.id}_{self.bitrate}"
|
||||
self.cancel = False
|
||||
self.ack = None
|
||||
|
||||
def toDict(self):
|
||||
return {
|
||||
|
@ -47,7 +48,8 @@ class QueueItem:
|
|||
'type': self.type,
|
||||
'id': self.id,
|
||||
'bitrate': self.bitrate,
|
||||
'uuid': self.uuid
|
||||
'uuid': self.uuid,
|
||||
'ack': self.ack
|
||||
}
|
||||
|
||||
def getResettedItem(self):
|
||||
|
|
|
@ -324,7 +324,7 @@ class QueueManager:
|
|||
logger.warn("URL not supported yet")
|
||||
return QueueError(url, "URL not supported yet", "unsupportedURL")
|
||||
|
||||
def addToQueue(self, dz, url, settings, bitrate=None, interface=None):
|
||||
def addToQueue(self, dz, url, settings, bitrate=None, interface=None, ack=None):
|
||||
if not dz.logged_in:
|
||||
if interface:
|
||||
interface.send("loginNeededToDownload")
|
||||
|
@ -335,7 +335,9 @@ class QueueManager:
|
|||
if link == "":
|
||||
return False
|
||||
logger.info("Generating queue item for: "+link)
|
||||
return self.generateQueueItem(dz, link, settings, bitrate, interface=interface)
|
||||
item = self.generateQueueItem(dz, link, settings, bitrate, interface=interface)
|
||||
item.ack = ack;
|
||||
return item
|
||||
|
||||
if type(url) is list:
|
||||
queueItem = []
|
||||
|
|
Loading…
Reference in New Issue