I changed a music's tags with python, I added photo

also, In windows everything is fine..

But when Bot send that music to a channel, cover of the music doesn't show and it have just play button on music file.

Even i set thumbnail for send_audio() but nothing changed. What should i do?

35 ответов

60 просмотров

Thumbnail should match 320x320

Arta- Автор вопроса
Arta- Автор вопроса
Arta
this is my thumb

i think photo[1] is thumbnail size. am i right ?

Arta- Автор вопроса
Arta
this is my thumb

Or should i match size manually with python?

Arta
this is my thumb

You should upload the thumb. You cannot use existing file ID

-1 would be the highest resolution photo. p.s.: please do not use newer features as a reply to my messages, since there isn't an update for my client yet.

That's all I see 🥲

Arta- Автор вопроса
Arta
still does not show thumbnail

The thumb appears in different places depending on which application you use. Which application are you testing with ?

Arta- Автор вопроса
Arta- Автор вопроса
Воспоминания <last name><a href=></a>
The thumb appears in different places depending on...

When i download the file from channel and try to upload it by myself it have thumbnail. But when bot doing it, doesn't have thumbnail

Arta
still does not show thumbnail

What is the thumb image that you are trying with ? can you upload the cover_thumb somewhere and send link?

Arta- Автор вопроса
Arta
still does not show thumbnail

or what's the value of cover_url that is having the issue?

Arta- Автор вопроса
Воспоминания <last name><a href=></a>
What is the thumb image that you are trying with ?...

Here it is one of thumb files: https://abaradmin.abar.in/ad/onlinemusic23/Amir%20Farjam%20-%20Baladet%20Shodam_thumb.jpg

Arta- Автор вопроса
Arta
Here it is one of thumb files: https://abaradmin.a...

it looks like it isn't a real jpeg file. you might need to convert it to a jpeg format that Telegram supports.

Arta- Автор вопроса
Arta
still does not show thumbnail

98 is sending the cover_url which is being downloaded, again right?

Arta
still does not show thumbnail

Try adding this code after you download the cover_thumb but before you call sendAudio ```python from PIL import Image from hachoir.metadata import extractMetadata from hachoir.parser import createParser metadata = extractMetadata(createParser(cover_thumb)) if metadata and metadata.has("width"): width = metadata.get("width") if metadata and metadata.has("height"): height = metadata.get("height") # ref: https://t.me/PyrogramChat/44663 Image.open(cover_thumb).convert("RGB").save(cover_thumb) img = Image.open(cover_thumb) # https://t.me/PyrogramChat/46463 img.resize((320, height)) img.save(cover_thumb, "JPEG") # https://pillow.readthedocs.io/en/3.1.x/reference/Image.html#create-thumbnails ```

Arta- Автор вопроса
Arta
Not working

Here is new cover link: https://abaradmin.abar.in/ad/onlinemusic23/fast_post/2023/11/1/Mohsen%20Ebrahimzadeh%20-%20Bighararam%202_thumb.jpg

Arta
Here is new cover link: https://abaradmin.abar.in/...

What happened when you tried with previous cover url ?

Arta
still does not show thumbnail

Maybe it is with an issue with your bot api wrapper that you are using. Not uploading thumb correctly ?

Arta- Автор вопроса

Похожие вопросы

Обсуждают сегодня

В чем прикол? Если поменять где-нибудь печать на %s - падает? import core.stdc.stdio; import core.stdc.stdlib; alias T = char; T* f() { int length = 3; auto p = cas...
Serg Gini
2
слушайте, ребят, немного не по теме вашего диалога. Пишу тулзу для обмена данными через UART с сжатием, она почти работает! но: Начало работы сервера Порт /dev/ttyUSB0 успешно...
quantumde1 Зубенко
4
Даже вот условно я, понимаю головой. Rust ну вот он язык который сейчас то что нужно, но вот его утомительная сложность в мелочах. От сингелтона, до инициализации типов и указ...
Vi
3
любопытно, а кто работал на низкоуровневых железках, а может и не только, вы считаете ассемблерными вызовы небезопасными, доверительными или условно безопасными?. Так-то на фо...
Constantin F.
2
ну, например, в ди оператор instanceof бывает эмулируют через cast, проверяя результат на null. Тогда имеем в какой-нить функции. class A {} class B : A {} B b = new B; if(au...
Constantin F.
4
server is started opened /dev/ttyUSB0 std.conv.ConvException@/usr/include/d/std/conv.d(2522): Unexpected end of input when converting from type string to type ulong --------...
quantumde1 Зубенко
1
Слушайте, я тут спеку васма смотрю и в целом все как устроено. Вопрос, а почему тяжело GC D подвести под память WASM? Есть какой то нюанс или тупо никто не занимался?
Vi
5
Я проснулся и готов опять затирать свой евангелизм. Никому не нужны сложности, нужна простота. Раст проще С++, по этому берут его, там где могут. Выйдет карбон и он будет про...
Vi
1
Кто то шарит, TS можно без зоопарка Node JS установить? Как раз будет повод поиграть с JS VM на Go. Я помню пару лет были такие вакансии, активно пиарили даже в го каналах...
Vi
1
> комьюнити я бы не судил по этому чату. Как мы видели по статам просмотров нескольких телеговских постов, то в чате их набивается 30-40 или даже выше, когда как общаются акти...
Constantin F.
4
Карта сайта