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

downloadFile, addFileToDownloads, Priority fails #3192

Closed
TunifyBasic opened this issue Dec 18, 2024 · 1 comment
Closed

downloadFile, addFileToDownloads, Priority fails #3192

TunifyBasic opened this issue Dec 18, 2024 · 1 comment

Comments

@TunifyBasic
Copy link

TunifyBasic commented Dec 18, 2024

sorry if i'm being annoing but i don't know here is what's going on:

def message_video(chat, chat_id, msg_id, content):
    vid_obj = content.get("video")    # in shea Allah: download thumbnails and this stuff...
    video = vid_obj.get("video")
    caption = vid_obj.get("caption")
    remote = video.get("remote")
    id = remote.get("id")
    print(chat_id, msg_id, id)
    td_send({ '@type': 'addFileToDownloads', 'file_id_': id, 'chat_id_': chat_id, 'message_id_': msg_id, 'priority_': 31 })

errors:

-10015579179xx 2765472399xx BAACAgQAAx0CaNRkgQABBAY4Z2I9IMlBSo9nDbTzGaPJp1y7QCcAAiEYAAJpMBBTfOp20nGOv1w2XX
{'@type': 'error', 'code': 400, 'message': 'Priority must be between 1 and 32', '@client_id': 1}

i changed the file priority to 1 -1 16 32 31 33 but it always say priority must be between 1 and 32 also done it using downloadFile and still same issue.

@levlam
Copy link
Contributor

levlam commented Dec 18, 2024

The parameters of requests never ends on underscores in JSON interface. Underscores are added to field names only in C++ interface, documentation for which is available at https://core.telegram.org/tdlib/docs/. The correct name of the parameter is "priority".

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

No branches or pull requests

2 participants