From bc7e8e96e3a26d9c402ffb135dff373370f97924 Mon Sep 17 00:00:00 2001 From: Tolmachev Igor Date: Mon, 23 Sep 2024 22:47:45 +0300 Subject: Add --cache flag --- video2story/__init__.py | 7 +++++++ video2story/uploader.py | 2 ++ 2 files changed, 9 insertions(+) diff --git a/video2story/__init__.py b/video2story/__init__.py index 5e04371..4a0d94d 100644 --- a/video2story/__init__.py +++ b/video2story/__init__.py @@ -141,6 +141,12 @@ story_parser.add_argument( metavar="PATH", help="Path to tdlib library file.", ) +story_parser.add_argument( + "--cache", + type=str, + metavar="PATH", + help="Path to tdlib cache directory.", +) story_parser.add_argument( "-s", "--start", @@ -191,6 +197,7 @@ def main() -> None: args.save_to_profile, args.protected_content, args.tdlib, + args.cache, args.start, args.end, ) diff --git a/video2story/uploader.py b/video2story/uploader.py index 34aebcc..bd23ae2 100644 --- a/video2story/uploader.py +++ b/video2story/uploader.py @@ -14,6 +14,7 @@ def upload( save_to_profile: bool, protected_content: bool, tdlib: str | None, + cache: str | None, start: int, end: int | None, ) -> None: @@ -23,6 +24,7 @@ def upload( database_encryption_key="just a secret", tdlib_verbosity=0, library_path=tdlib, + files_directory=cache, phone=phone, ) telegram.login() -- cgit v1.3