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?
Thumbnail should match 320x320
this is my thumb
i think photo[1] is thumbnail size. am i right ?
Or should i match size manually with python?
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 🥲
That was a small trolling from my side, sorry)
still does not show thumbnail
The thumb appears in different places depending on which application you use. Which application are you testing with ?
Telegram Desktop Telegram Android
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
What is the thumb image that you are trying with ? can you upload the cover_thumb somewhere and send link?
Which thumb? at the first ? or in send_audio ? Yes i will try it
or what's the value of cover_url that is having the issue?
Here it is one of thumb files: https://abaradmin.abar.in/ad/onlinemusic23/Amir%20Farjam%20-%20Baladet%20Shodam_thumb.jpg
The cover_url is the original cover
it looks like it isn't a real jpeg file. you might need to convert it to a jpeg format that Telegram supports.
Interesting :D My thumb image comes from Telegram
98 is sending the cover_url which is being downloaded, again right?
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 ```
Here is new cover link: https://abaradmin.abar.in/ad/onlinemusic23/fast_post/2023/11/1/Mohsen%20Ebrahimzadeh%20-%20Bighararam%202_thumb.jpg
What happened when you tried with previous cover url ?
Maybe it is with an issue with your bot api wrapper that you are using. Not uploading thumb correctly ?
Maybe, idk Btw very thanks for your time🙏
Обсуждают сегодня