From 314beb682fa568a14f3005ef3ff0c6ebbfd75d28 Mon Sep 17 00:00:00 2001 From: kermit Date: Thu, 1 Oct 2020 11:56:51 +0100 Subject: [PATCH] Expose extrasPath to queue item --- deemix/app/downloadjob.py | 3 ++- deemix/app/queueitem.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/deemix/app/downloadjob.py b/deemix/app/downloadjob.py index c283071..107ac3b 100644 --- a/deemix/app/downloadjob.py +++ b/deemix/app/downloadjob.py @@ -577,8 +577,9 @@ class DownloadJob: logger.info(f"[{track.mainArtist['name']} - {track.title}] Track download completed\n{str(writepath)}") self.queueItem.downloaded += 1 self.queueItem.files.append(str(writepath)) + self.queueItem.extrasPath = str(self.extrasPath) if self.interface: - self.interface.send("updateQueue", {'uuid': self.queueItem.uuid, 'downloaded': True, 'downloadPath': str(writepath)}) + self.interface.send("updateQueue", {'uuid': self.queueItem.uuid, 'downloaded': True, 'downloadPath': str(writepath), 'extrasPath': str(self.extrasPath)}) return result def getPreferredBitrate(self, track): diff --git a/deemix/app/queueitem.py b/deemix/app/queueitem.py index 819f331..49e223b 100644 --- a/deemix/app/queueitem.py +++ b/deemix/app/queueitem.py @@ -9,6 +9,7 @@ class QueueItem: self.type = queueItemDict['type'] self.id = queueItemDict['id'] self.bitrate = queueItemDict['bitrate'] + self.extrasPath = queueItemDict.get('extrasPath', '') self.files = queueItemDict['files'] self.downloaded = queueItemDict['downloaded'] self.failed = queueItemDict['failed'] @@ -24,6 +25,7 @@ class QueueItem: self.type = type self.id = id self.bitrate = bitrate + self.extrasPath = None self.files = [] self.settings = settings self.downloaded = 0 @@ -41,6 +43,7 @@ class QueueItem: 'cover': self.cover, 'explicit': self.explicit, 'size': self.size, + 'extrasPath': self.extrasPath, 'files': self.files, 'downloaded': self.downloaded, 'failed': self.failed,