mirror of
https://gitlab.com/RemixDev/deemix-py.git
synced 2024-12-29 11:06:14 +00:00
Merge pull request 'Pass back the location of the downloaded files in queue items' (#41) from kermit/deemix:return-files into main
Reviewed-on: https://codeberg.org/RemixDev/deemix/pulls/41
This commit is contained in:
commit
a2b6a1e2d1
|
@ -517,6 +517,7 @@ class DownloadJob:
|
|||
|
||||
logger.info(f"[{track.mainArtist['name']} - {track.title}] Track download completed\n{writepath}")
|
||||
self.queueItem.downloaded += 1
|
||||
self.queueItem.files.append(writepath)
|
||||
if self.interface:
|
||||
self.interface.send("updateQueue", {'uuid': self.queueItem.uuid, 'downloaded': True, 'downloadPath': writepath})
|
||||
return result
|
||||
|
|
|
@ -10,6 +10,7 @@ class QueueItem:
|
|||
self.type = queueItemDict['type']
|
||||
self.id = queueItemDict['id']
|
||||
self.bitrate = queueItemDict['bitrate']
|
||||
self.files = queueItemDict['files']
|
||||
self.downloaded = queueItemDict['downloaded']
|
||||
self.failed = queueItemDict['failed']
|
||||
self.errors = queueItemDict['errors']
|
||||
|
@ -23,6 +24,7 @@ class QueueItem:
|
|||
self.type = type
|
||||
self.id = id
|
||||
self.bitrate = bitrate
|
||||
self.files = []
|
||||
self.settings = settings
|
||||
self.downloaded = 0
|
||||
self.failed = 0
|
||||
|
@ -37,6 +39,7 @@ class QueueItem:
|
|||
'artist': self.artist,
|
||||
'cover': self.cover,
|
||||
'size': self.size,
|
||||
'files': self.files,
|
||||
'downloaded': self.downloaded,
|
||||
'failed': self.failed,
|
||||
'errors': self.errors,
|
||||
|
|
Loading…
Reference in a new issue