Smol fixes rssVideos

This commit is contained in:
Geoffrey Frogeye 2022-03-27 13:02:55 +02:00
parent d88520552b
commit df6ab139af
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -259,6 +259,8 @@ class RVElement:
def update_post_download(self, info: dict) -> None: def update_post_download(self, info: dict) -> None:
self.downloaded_filepath = self.parent.ytdl_dry.prepare_filename(info) 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) self.metafile_write("path", self.downloaded_filepath)
@property @property
@ -687,7 +689,6 @@ def main() -> None:
os.chdir(args.videos) os.chdir(args.videos)
database = get_database(args) database = get_database(args)
database.clean()
log.debug("Running action") log.debug("Running action")
duration = 0 duration = 0
@ -705,6 +706,7 @@ def main() -> None:
raise NotImplementedError(f"Unimplemented action: {args.action}") raise NotImplementedError(f"Unimplemented action: {args.action}")
log.info(f"Total duration: {format_duration(duration)}") log.info(f"Total duration: {format_duration(duration)}")
database.try_mark_watched_read() database.try_mark_watched_read()
database.clean()
if __name__ == "__main__": if __name__ == "__main__":