Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Dynamically adding download links #634

Open
huajideshutiao opened this issue May 30, 2024 · 3 comments
Open

[Feat] Dynamically adding download links #634

huajideshutiao opened this issue May 30, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@huajideshutiao
Copy link

huajideshutiao commented May 30, 2024

Proposal

I hope to use a certain parameter to add a new link to the download list when the program has already started downloading.

Background

This can facilitate some automated operations, such as using telegram bots for remote downloads.

Workarounds

None.

@huajideshutiao huajideshutiao added the enhancement New feature or request label May 30, 2024
@iyear
Copy link
Owner

iyear commented Jun 3, 2024

Would calling the tdl command each time when there is a new url solve the issue?

@huajideshutiao
Copy link
Author

Would calling the tdl command each time when there is a new url solve the issue?

It should be possible.
Additional information: I came up with this issue during a discussion on another project because

Discussion link

Currently the bot only supports single msg link in a message, if multiple messages containing msg link were received and started download at the same time, multiple tdl instance will be created, but tdl does not allow this. #564

It may be possible in the future to support multiple msg link in a single message and pass the msg link to tdl, in this way only one instance of tdl will be created and will download them at the same time.

If there is currently a way to resolve this conflict (as I have been busy with certain things and have not used TDL for a while), then this issue should be closed.

@iyear
Copy link
Owner

iyear commented Jun 3, 2024

Currently the bot only supports single msg link in a message, if multiple messages containing msg link were received and started download at the same time, multiple tdl instance will be created, but tdl does not allow this. #564

This is possible. You can achieve this using file storage. Reading and writing in JSON file format will not lock the file. Ref: https://docs.iyear.me/tdl/guide/global-config/#--storage

Note: Using the same session token across multiple instances is not recommended as it may lead to unexpected situations. However, you might give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants