Added start queue function
This commit is contained in:
parent
318ad689ea
commit
b91d2a1af3
|
@ -443,9 +443,7 @@ class QueueManager:
|
||||||
if interface: interface.send("addedToQueue", queueItem.getSlimmedItem())
|
if interface: interface.send("addedToQueue", queueItem.getSlimmedItem())
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
if not self.queueThread:
|
self.startQueue(interface, dz)
|
||||||
self.queueThread = threading.Thread(target=self.nextItem, args=(dz, interface))
|
|
||||||
self.queueThread.start()
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def nextItem(self, dz=None, interface=None):
|
def nextItem(self, dz=None, interface=None):
|
||||||
|
@ -529,6 +527,12 @@ class QueueManager:
|
||||||
'restored': True
|
'restored': True
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def startQueue(self, interface=None, dz=None):
|
||||||
|
if not dz: dz = self.dz
|
||||||
|
if dz.logged_in and not self.queueThread:
|
||||||
|
self.queueThread = threading.Thread(target=self.nextItem, args=(dz, interface))
|
||||||
|
self.queueThread.start()
|
||||||
|
|
||||||
def restoreQueue(self, queue, queueComplete, queueList, settings):
|
def restoreQueue(self, queue, queueComplete, queueList, settings):
|
||||||
self.queue = queue
|
self.queue = queue
|
||||||
self.queueComplete = queueComplete
|
self.queueComplete = queueComplete
|
||||||
|
|
Loading…
Reference in New Issue