It's now possible to cancel spotify playlist conversion
This commit is contained in:
parent
2a662928f9
commit
00885ae674
|
@ -104,6 +104,7 @@ class DownloadJob:
|
||||||
self.playlistURLs = []
|
self.playlistURLs = []
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
if not self.queueItem.cancel:
|
||||||
if isinstance(self.queueItem, QISingle):
|
if isinstance(self.queueItem, QISingle):
|
||||||
result = self.downloadWrapper(self.queueItem.single)
|
result = self.downloadWrapper(self.queueItem.single)
|
||||||
if result:
|
if result:
|
||||||
|
|
|
@ -237,6 +237,8 @@ class SpotifyHelper:
|
||||||
interface.send("startConversion", queueItem.uuid)
|
interface.send("startConversion", queueItem.uuid)
|
||||||
collection = []
|
collection = []
|
||||||
for pos, track in enumerate(queueItem.extra['unconverted'], start=1):
|
for pos, track in enumerate(queueItem.extra['unconverted'], start=1):
|
||||||
|
if queueItem.cancel:
|
||||||
|
return
|
||||||
if str(track['id']) in cache['tracks']:
|
if str(track['id']) in cache['tracks']:
|
||||||
trackID = cache['tracks'][str(track['id'])]
|
trackID = cache['tracks'][str(track['id'])]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue