diff options
| author | Tolmachev Igor <me@igorek.dev> | 2024-09-23 22:47:45 +0300 |
|---|---|---|
| committer | Tolmachev Igor <me@igorek.dev> | 2024-09-23 22:47:45 +0300 |
| commit | bc7e8e96e3a26d9c402ffb135dff373370f97924 (patch) | |
| tree | aef8924922354bac308ebc33ac66936c4287fffc | |
| parent | 44b8439b5b92bc5892f329fbca3f940196dedc70 (diff) | |
| download | video2story-bc7e8e96e3a26d9c402ffb135dff373370f97924.tar.gz video2story-bc7e8e96e3a26d9c402ffb135dff373370f97924.zip | |
Add --cache flag
| -rw-r--r-- | video2story/__init__.py | 7 | ||||
| -rw-r--r-- | video2story/uploader.py | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/video2story/__init__.py b/video2story/__init__.py index 5e04371..4a0d94d 100644 --- a/video2story/__init__.py +++ b/video2story/__init__.py | |||
| @@ -142,6 +142,12 @@ story_parser.add_argument( | |||
| 142 | help="Path to tdlib library file.", | 142 | help="Path to tdlib library file.", |
| 143 | ) | 143 | ) |
| 144 | story_parser.add_argument( | 144 | story_parser.add_argument( |
| 145 | "--cache", | ||
| 146 | type=str, | ||
| 147 | metavar="PATH", | ||
| 148 | help="Path to tdlib cache directory.", | ||
| 149 | ) | ||
| 150 | story_parser.add_argument( | ||
| 145 | "-s", | 151 | "-s", |
| 146 | "--start", | 152 | "--start", |
| 147 | type=int, | 153 | type=int, |
| @@ -191,6 +197,7 @@ def main() -> None: | |||
| 191 | args.save_to_profile, | 197 | args.save_to_profile, |
| 192 | args.protected_content, | 198 | args.protected_content, |
| 193 | args.tdlib, | 199 | args.tdlib, |
| 200 | args.cache, | ||
| 194 | args.start, | 201 | args.start, |
| 195 | args.end, | 202 | args.end, |
| 196 | ) | 203 | ) |
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( | |||
| 14 | save_to_profile: bool, | 14 | save_to_profile: bool, |
| 15 | protected_content: bool, | 15 | protected_content: bool, |
| 16 | tdlib: str | None, | 16 | tdlib: str | None, |
| 17 | cache: str | None, | ||
| 17 | start: int, | 18 | start: int, |
| 18 | end: int | None, | 19 | end: int | None, |
| 19 | ) -> None: | 20 | ) -> None: |
| @@ -23,6 +24,7 @@ def upload( | |||
| 23 | database_encryption_key="just a secret", | 24 | database_encryption_key="just a secret", |
| 24 | tdlib_verbosity=0, | 25 | tdlib_verbosity=0, |
| 25 | library_path=tdlib, | 26 | library_path=tdlib, |
| 27 | files_directory=cache, | ||
| 26 | phone=phone, | 28 | phone=phone, |
| 27 | ) | 29 | ) |
| 28 | telegram.login() | 30 | telegram.login() |
