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 ответов

48 просмотров

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- Автор вопроса

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

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

Эх кто-то пришел и весь праздник испортил :( You need complex FBX scene importing setup to change things on import? good luck with that. You need navigation and pathfinding? g...
Serg Gini
5
ну кстати в ноду 22 завезли движок 12.4 с WasmGC. А как у нас дела с wasm, мб в дискорде что-то кто-то писал-отвечал? Из BetterC, конечно, тоже можно выжать что-нибудь, но хот...
Constantin_FV
1
на D можно построить абсолютно разный архитект, как объектный, так и нет, оч широкий простор для принятия решений. Однако проблема в том, что большинство книг об айтишной архи...
Constantin_FV
1
День добрый. Стандартная библиотека phobos (std.array) ссылается на внешнюю фунцию _d_newarrayUTrace и при сборке с ключом profile-gc эта ссылка остаётся неопределённой. Никак...
slacker linuxoid
5
а у нас кто-нибудь разбирается в матлаб? Накопал статью по замощению Фодерберга, о нём вообще мало инфы в сети. Но там матлабовский код, который нужно через песочницу по сути ...
Constantin_FV
1
а что на D можно делать под 3й Godot ?
Dmitry Ponyatov
3
ну эт я в вове такой, а тут я... на расте надо писать, на д куча проблем, годот тоже не лапочка. сидишь в афиге, а я еще бросил курить... и думаешь, а почему Я? хд.
Vi
1
открой авесом лист, если тебе лень даже это сорян, мне это вообще нет смысла делать. Интересно? Гугли.
Vi
1
string xczhojoxueaflfhhygcc ="xczhojoxueaflfhhygcc"; long xczhojoxueaflfhhygcc_2 =1368962155; import std.conv: text; writeln(text(xczhojoxueaflfhhygcc, " ", xczhojoxueaflfhhyg...
Constantin_FV
6
А кто-нибудь встречал в пакетах\графических движках генерацию мозаик, Пенроуз и т.п.? На гитхабе вижу около сотни репов, ток по Пенроузу + разбросаны сниппеты по сети, но мб г...
Constantin_FV
3
Карта сайта