This commit is contained in:
parent
f6843713e7
commit
45cd3968e3
|
|
@ -52,6 +52,8 @@ class PlayerTemplates:
|
|||
cd_log += f"Can't get cover content: {e}. "
|
||||
cover_content = None
|
||||
|
||||
local_content.meta['cover_cid'] = cover_content.cid.serialize_v2() if cover_content else None
|
||||
|
||||
local_content_cid = local_content.cid
|
||||
local_content_cid.content_type = 'audio/mpeg'
|
||||
local_content_url = f"{PROJECT_HOST}/api/v1/storage/{local_content_cid.serialize_v2(include_accept_type=True)}"
|
||||
|
|
@ -98,6 +100,7 @@ class PlayerTemplates:
|
|||
'text': self.user.translated('buyTrackListenLicense_button').format(price=str(round(0.15 , 3))),
|
||||
'callback_data': f'PC_{content.id}'
|
||||
}])
|
||||
template_kwargs['audio'] = URLInputFile(local_content_url + '?seconds_limit=30')
|
||||
|
||||
make_log("TG-Player", f"Send content {content_type} ({content_encoding}) to chat {self._chat_id}. {cd_log}")
|
||||
for kmsg in self.db_session.query(KnownTelegramMessage).filter_by(
|
||||
|
|
|
|||
Loading…
Reference in New Issue