telegram-upload
telegram-upload copied to clipboard
No thumbnails when uploading audio files
- telegram-upload version: 0.5.1
- Python version: 3.10.6
- Operating System: Windows 11
- Dependencies list:
click==8.1.3
colorama==0.4.5 cryptg==0.3.1
hachoir==3.1.3 prompt-toolkit==3.0.30 pyaes==1.6.1 pyasn1==0.4.8 rsa==4.9 telegram-upload==0.5.1 telethon==1.24.0 wcwidth==0.2.5
Description
When I upload audio files, they appear in channel without the little thumbnails on the background of play button.
What I Did
telegram-upload --to chat-name --directories recursive path-to-the-file
It requires research and testing. The issue will be investigated.
I have tried to upload an audio from the official client and the audio files are not including a thumb or background. Can you attach a picture of your client?
This is the file Glass Animals - Heat Waves.zip
Uploaded with Telegram Desktop v. 4.8.3
Uploaded with telegram-upload v. 0.7.0
The image is a cover inside the metadatas of the audio file. The issue has been confirmed, thanks.
https://stackoverflow.com/questions/28292632/does-hachoir-metadata-or-libextractor-extract-covers-from-id3v2-and-all-another
This is a bug in hachoir library? Should I report there?
This is a missing feature. i need search other solution.
Maybe mutagen could help you.
Maybe mutagen could help you.
Maybe: https://stackoverflow.com/questions/41746014/extract-cover-art-from-remote-mp3
https://stackoverflow.com/questions/26889317/extract-id3-tags-of-a-mp3-url-with-partial-download-using-python https://github.com/nicfit/eyeD3/tree/master
Just mp3 metadata? There must be a solution to extract metadata from all audio files accepted by Telegram.
how does the client do it ? im using 64gram and when i upload audio files it preserves the album art.there has to be a way
Hey all. i struggle with same issue. so here's an mp3 file with thumb at metadata. sent via client lands as expected with the thumb displayed. but same file sent via the bot api lands with no thumb!
i tried multipart formdata with node fetch, and with axios, tried appending a thumbnail as a blob (as it's prescribed in docs) ...
nothing!
those are giving the urls to the audio at cdn for telegram to download. audio lands . as music . all good .
but not the thumbpic...
The only thing that works is sending formData with the audio as blob and the thumb along with it. WORKS as wanted! but it doubles the load on the server (delivering files both to cdn and to telegram) which i'd like to avoid. i mean there must be a way...
so telegram fetches the file via url but it treats it differently than client file drop...
i tried media group audioFiles too.. well grouped ones land same thubmless way. i think i tried everything. i even copied metadata to ID3v1.
HELP!
one else to notice: it does read the artist and title from metadata and displays. so i don't say prformer:.... and title: ... in request. it's all in the file. but ignores the thumbnail image. whether it's jpeg or png.