Expose extrasPath to queue item

This commit is contained in:
kermit 2020-10-01 11:56:51 +01:00
parent 0a11f53c4c
commit 314beb682f
2 changed files with 5 additions and 1 deletions

View File

@ -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):

View File

@ -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,