Fixed queue item not cancelling correctly
This commit is contained in:
parent
224a62aad2
commit
261b7adb36
|
@ -150,12 +150,7 @@ class Downloader:
|
||||||
self.playlistURLs = []
|
self.playlistURLs = []
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
if self.downloadObject.isCanceled:
|
if not self.downloadObject.isCanceled:
|
||||||
if self.listener:
|
|
||||||
self.listener.send('currentItemCancelled', self.downloadObject.uuid)
|
|
||||||
self.listener.send("removedFromQueue", self.downloadObject.uuid)
|
|
||||||
return
|
|
||||||
|
|
||||||
if isinstance(self.downloadObject, Single):
|
if isinstance(self.downloadObject, Single):
|
||||||
track = self.downloadWrapper({
|
track = self.downloadWrapper({
|
||||||
'trackAPI_gw': self.downloadObject.single['trackAPI_gw'],
|
'trackAPI_gw': self.downloadObject.single['trackAPI_gw'],
|
||||||
|
@ -175,6 +170,10 @@ class Downloader:
|
||||||
self.afterDownloadCollection(tracks)
|
self.afterDownloadCollection(tracks)
|
||||||
|
|
||||||
if self.listener:
|
if self.listener:
|
||||||
|
if self.listener:
|
||||||
|
self.listener.send('currentItemCancelled', self.downloadObject.uuid)
|
||||||
|
self.listener.send("removedFromQueue", self.downloadObject.uuid)
|
||||||
|
else:
|
||||||
self.listener.send("finishDownload", self.downloadObject.uuid)
|
self.listener.send("finishDownload", self.downloadObject.uuid)
|
||||||
|
|
||||||
def download(self, extraData, track=None):
|
def download(self, extraData, track=None):
|
||||||
|
|
Loading…
Reference in New Issue