Pass back the location of the downloaded files in queue items
This allows a third party user to locate downloaded files from a previous session (i.e. if they weren't connected to receieve the updateQueue requsts)
This commit is contained in:
parent
38a16d9fdd
commit
ea39527ea4
|
@ -517,6 +517,7 @@ class DownloadJob:
|
||||||
|
|
||||||
logger.info(f"[{track.mainArtist['name']} - {track.title}] Track download completed\n{writepath}")
|
logger.info(f"[{track.mainArtist['name']} - {track.title}] Track download completed\n{writepath}")
|
||||||
self.queueItem.downloaded += 1
|
self.queueItem.downloaded += 1
|
||||||
|
self.queueItem.files.append(writepath)
|
||||||
if self.interface:
|
if self.interface:
|
||||||
self.interface.send("updateQueue", {'uuid': self.queueItem.uuid, 'downloaded': True, 'downloadPath': writepath})
|
self.interface.send("updateQueue", {'uuid': self.queueItem.uuid, 'downloaded': True, 'downloadPath': writepath})
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -10,6 +10,7 @@ class QueueItem:
|
||||||
self.type = queueItemDict['type']
|
self.type = queueItemDict['type']
|
||||||
self.id = queueItemDict['id']
|
self.id = queueItemDict['id']
|
||||||
self.bitrate = queueItemDict['bitrate']
|
self.bitrate = queueItemDict['bitrate']
|
||||||
|
self.files = queueItemDict['files']
|
||||||
self.downloaded = queueItemDict['downloaded']
|
self.downloaded = queueItemDict['downloaded']
|
||||||
self.failed = queueItemDict['failed']
|
self.failed = queueItemDict['failed']
|
||||||
self.errors = queueItemDict['errors']
|
self.errors = queueItemDict['errors']
|
||||||
|
@ -23,6 +24,7 @@ class QueueItem:
|
||||||
self.type = type
|
self.type = type
|
||||||
self.id = id
|
self.id = id
|
||||||
self.bitrate = bitrate
|
self.bitrate = bitrate
|
||||||
|
self.files = []
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
self.downloaded = 0
|
self.downloaded = 0
|
||||||
self.failed = 0
|
self.failed = 0
|
||||||
|
@ -37,6 +39,7 @@ class QueueItem:
|
||||||
'artist': self.artist,
|
'artist': self.artist,
|
||||||
'cover': self.cover,
|
'cover': self.cover,
|
||||||
'size': self.size,
|
'size': self.size,
|
||||||
|
'files': self.files,
|
||||||
'downloaded': self.downloaded,
|
'downloaded': self.downloaded,
|
||||||
'failed': self.failed,
|
'failed': self.failed,
|
||||||
'errors': self.errors,
|
'errors': self.errors,
|
||||||
|
|
Loading…
Reference in New Issue