From 7292e8ea88f209b38b0cf5fe48d54a265614a13b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sun, 26 Dec 2021 15:06:40 +0100 Subject: [PATCH] rssVideos: Make --research about downloading videos --- config/scripts/rssVideos | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/scripts/rssVideos b/config/scripts/rssVideos index 35e8284..109b85c 100755 --- a/config/scripts/rssVideos +++ b/config/scripts/rssVideos @@ -163,7 +163,7 @@ class RVElement: return "ytdl_infos" in self.__dict__ def salvage_cache(self, cache: "RVElement") -> None: - if not self.parent.args.research and cache.is_researched: + if cache.is_researched: self.__dict__["ytdl_infos"] = cache.__dict__["ytdl_infos"] log.debug(f"From cache: {self}") if cache.downloaded_filepath: @@ -233,6 +233,8 @@ class RVElement: def download(self) -> None: assert self.is_video log.info(f"Downloading: {self}") + if self.parent.args.research: + del self.ytdl_infos if not self.parent.args.dryrun: with yt_dlp.YoutubeDL(self.parent.ytdl_opts) as ydl: ydl.add_post_processor(SaveInfoPP(self))