Weird thing with telegram bot api, can't change title of audio
Asked Answered
C

2

5

Some weird thing with telegram api. I am trying to send audio from telegram bot and by the way to change performer and title, but I can't. First of all I thoght I made a mistake, but not! I tried to do the same thing from the browser search line becouse there is no chance to do something wrong, and no results! May be you can try to do the same thing? It would be great, becouse I don't know what is wrong. I am trying to do it on Python with pyTelegramBotAPI. For example code:

import telebot
import const

#Подключаюсь к боту
bot = telebot.TeleBot(const.token)

@bot.message_handler(content_types=["text"])
def handle_command(message):
a = bot.send_audio(message.from_user.id, musicurl, caption=None, duration=None, performer="Pharik", title="hfdhdfh",
               reply_to_message_id=None)
print(a.audio.performer)
print(a.audio.title)
bot.polling(none_stop=True, interval=0)
Colcothar answered 29/7, 2017 at 0:45 Comment(0)
C
10

I discover that you can't set performer and title parameters if you upload audio file by the link. If you are doing it with local file, it works. There is one way I see, take the file from link, download it, use EasyId3 to rewrite meta of mp3 file and after that send it to Telegram. But it's weird I think. Maybe it's a mistake, becouse Telegram Bot API has this parameters and it doesn't work. However Telegram uploads files on own servers, so they can change meta on their side using parametrs. Where is the logic? How knows any solutions?

Colcothar answered 31/7, 2017 at 8:53 Comment(2)
confirmed, the same issue. title & performer does not work, but caption is works. really weirdProspect
nothing has changed at the moment. Now I’m looking for a solution myselfConti
A
1

I used Mp3tag to edit Title (title) and Artist (performer) of the mp3 file and Telegram use it to display after uploaded.

Alveolate answered 15/4, 2022 at 8:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.