From 3a5d2b93f5e3edd807c061ccb344a1803804a42e Mon Sep 17 00:00:00 2001 From: ArabCoders Date: Sat, 6 Jan 2024 21:50:08 +0300 Subject: [PATCH] Better Post-Live Manifestless mode. --- app/DownloadQueue.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/DownloadQueue.py b/app/DownloadQueue.py index 89c7f52b..a04963f4 100644 --- a/app/DownloadQueue.py +++ b/app/DownloadQueue.py @@ -156,6 +156,10 @@ class DownloadQueue: if dlInfo.info.live_in: dlInfo.info.status = 'not_live' itemDownload = self.done.put(dlInfo) + elif self.config.allow_manifestless is False and 'live_status' in entry and 'post_live' == entry.get('live_status'): + dlInfo.info.status = 'error' + dlInfo.info.error = 'Video is in Post-Live Manifestless mode.' + itemDownload = self.done.put(dlInfo) else: itemDownload = self.queue.put(dlInfo) self.event.set() @@ -221,18 +225,12 @@ class DownloadQueue: if self.isDownloaded(entry): raise yt_dlp.utils.ExistingVideoReached() - if self.config.allow_manifestless is False and 'live_status' in entry and 'post_live' == entry.get('live_status'): - raise yt_dlp.utils.YoutubeDLError( - 'Video is in Post-Live Manifestless mode.') - log.debug(f'entry: extract info says: {entry}') except yt_dlp.utils.ExistingVideoReached: return {'status': 'error', 'msg': 'Video has been downloaded already and recorded in archive.log file.'} except yt_dlp.utils.YoutubeDLError as exc: return {'status': 'error', 'msg': str(exc)} - # - return await self.__add_entry( entry=entry, quality=quality,