From df6ab139af45f72d73b3e68a29c0e85aa38d1e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sun, 27 Mar 2022 13:02:55 +0200 Subject: [PATCH] Smol fixes rssVideos --- config/scripts/rssVideos | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/scripts/rssVideos b/config/scripts/rssVideos index e742f00..647f59c 100755 --- a/config/scripts/rssVideos +++ b/config/scripts/rssVideos @@ -259,6 +259,8 @@ class RVElement: def update_post_download(self, info: dict) -> None: self.downloaded_filepath = self.parent.ytdl_dry.prepare_filename(info) + assert self.downloaded_filepath + assert self.downloaded_filepath.startswith(self.basename) self.metafile_write("path", self.downloaded_filepath) @property @@ -687,7 +689,6 @@ def main() -> None: os.chdir(args.videos) database = get_database(args) - database.clean() log.debug("Running action") duration = 0 @@ -705,6 +706,7 @@ def main() -> None: raise NotImplementedError(f"Unimplemented action: {args.action}") log.info(f"Total duration: {format_duration(duration)}") database.try_mark_watched_read() + database.clean() if __name__ == "__main__":