mirror of
https://github.com/alexta69/metube.git
synced 2025-04-02 20:07:36 +03:00
Fix: Restore queue when container restarted
In case the user tries to restart the container with an updated container but an old queue file, the system checks if the object contains the attributes playlist_strict_mode and playlist_item_limit. If they are not present, it sets them to False and 0, respectively.
This commit is contained in:
parent
2872e8e6ab
commit
c89aa44628
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ class DownloadQueue:
|
|||
|
||||
async def __import_queue(self):
|
||||
for k, v in self.queue.saved_items():
|
||||
await self.add(v.url, v.quality, v.format, v.folder, v.custom_name_prefix, v.playlist_strict_mode, v.playlist_item_limit)
|
||||
await self.add(v.url, v.quality, v.format, v.folder, v.custom_name_prefix, getattr(v, 'playlist_strict_mode', False), getattr(v, 'playlist_item_limit', 0))
|
||||
|
||||
async def initialize(self):
|
||||
log.info("Initializing DownloadQueue")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue