mirror of
https://github.com/Dineshkarthik/telegram_media_downloader.git
synced 2024-09-20 07:16:32 +08:00
Merge pull request #50 from Lqlsoftware/master
Fix: Updating `last_message_id` after each batch
This commit is contained in:
commit
6f09d1ebbd
14
README.md
14
README.md
|
@ -93,3 +93,17 @@ All the downloaded media will be stored inside respective direcotry named in t
|
|||
| photo | path/to/project/photo |
|
||||
| video | path/to/project/video |
|
||||
| voice | path/to/project/voice |
|
||||
|
||||
## Proxy
|
||||
`Socks5` proxy is supported in this project currently. To use it, simply create a `config.ini` file in the path of this project, and edit it with your proxy server info as follow:
|
||||
|
||||
```ini
|
||||
[proxy]
|
||||
enabled = True
|
||||
hostname = 127.0.0.1
|
||||
port = 1080
|
||||
username =
|
||||
password =
|
||||
```
|
||||
|
||||
Then the proxy will automatically be enabled.
|
|
@ -214,6 +214,8 @@ async def begin_import(config: dict, pagination_limit: int):
|
|||
pagination_count = 0
|
||||
messages_list = []
|
||||
messages_list.append(message)
|
||||
config["last_read_message_id"] = last_read_message_id
|
||||
update_config(config)
|
||||
if messages_list:
|
||||
last_read_message_id = await process_messages(
|
||||
client,
|
||||
|
|
Loading…
Reference in a new issue