diff --git a/app/client_bot/routers/content.py b/app/client_bot/routers/content.py index 8a14729..b481892 100644 --- a/app/client_bot/routers/content.py +++ b/app/client_bot/routers/content.py @@ -136,7 +136,7 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use # Upload preview of decrypted content (limit to 30 seconds) if content_type_declared in ('audio', 'video'): - if True or not decrypted_content.meta.get('telegram_file_cache_preview'): + if not decrypted_content.meta.get('telegram_file_cache_preview'): try: # Construct URL for trimmed preview using decrypted content preview_url = f"{PROJECT_HOST}/api/v1/storage/{decrypted_content.cid.serialize_v2(include_accept_type=True)}?seconds_limit=30" @@ -152,7 +152,10 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use preview_message = await query.bot.send_audio( chat_id=CACHE_CHAT_ID, # Cache chat id defined in configuration audio=types.URLInputFile(preview_url), # Upload audio using URL - caption="Preview upload" # English caption + caption="Preview upload", # English caption + title=title, + performer=performer, + thumbnail=result_kwargs.get('thumb_url'), ) preview_file_id = preview_message.audio.file_id # Save the preview file_id in decrypted_content.meta for future use @@ -170,8 +173,6 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use types.InlineQueryResultCachedAudio( id=f"NC_{content.id}_{int(datetime.now().timestamp() // 60)}", audio_file_id=decrypted_content.meta['telegram_file_cache_preview'], - title=title, - performer=performer, caption=hashtags_str + user.translated('p_playerContext_preview'), parse_mode='html', reply_markup=get_inline_keyboard([