Better Post-Live Manifestless mode.

This commit is contained in:
ArabCoders 2024-01-06 21:50:08 +03:00
parent 67d7f61a07
commit 3a5d2b93f5

View file

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