1 year ago
#324502
titsex
Telegraf.js does not display some thumbnails in the audio media
By some query, using ytsr I get information about the video (link, thumbnail, etc).
Then, using ytdl-core, I download the audio of this video and return the cropped thumbnail (320x320 - telegram thumbnail standards)
When trying to send an audio message, NOT MEDIA, the thumbnail is shown, all the metadata of the audio recording is correct, such as I specified.
But when I send multiple audios as media, the thumbnail is not displayed, although other metadata, such as the duration or title of the audio, is displayed correctly.
P.S: I tried a variety of methods, made a request for a link to an image, saved to a clipboard, and much more, even used third-party libraries like node-id3 - nothing helps. Media does not display thumbnail.
You can say that this is a bug in telegram or the module that I use (telegraf), but there is one catch - my bot, when receiving a link to a track in spotify, gets information about it using the spotify-url-info module, which also returns thumbnail. And now this thumbnail is displayed in the media.
P.S: I saved both thumbnails, they are identical, from file type to size and bit color.
a function that, by query, returns audio and a thumbnail
Second photo. Telegram displays her thumbnail, although it is the same size as the first one
In the media, all audio recordings must have a thumbnail.
typescript
telegram
telegram-bot
telegraf
telegraf.js
0 Answers
Your Answer