From 11e2645aa9420eb21744a3c0f80ea675c13b7c30 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 3 May 2025 16:00:30 +0300 Subject: [PATCH] edit player ui --- app/core/background/indexer_service.py | 2 +- app/core/models/_telegram/templates/player.py | 32 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/core/background/indexer_service.py b/app/core/background/indexer_service.py index e8de258..fedd4c0 100644 --- a/app/core/background/indexer_service.py +++ b/app/core/background/indexer_service.py @@ -76,7 +76,7 @@ async def indexer_loop(memory, platform_found: bool, seqno: int) -> [bool, int]: ).order_by(desc(WalletConnection.id)).first() wallet_owner_user = wallet_owner_connection.user if wallet_owner_user.telegram_id: - wallet_owner_bot = Wrapped_CBotChat(memory._client_telegram_bot, chat_id=wallet_owner_user.telegram_id, user=wallet_owner_user, db_session=session) + wallet_owner_bot = Wrapped_CBotChat(memory._telegram_bot, chat_id=wallet_owner_user.telegram_id, user=wallet_owner_user, db_session=session) await wallet_owner_bot.send_message( user.translated('p_licenseWasBought').format( username=user.front_format(), diff --git a/app/core/models/_telegram/templates/player.py b/app/core/models/_telegram/templates/player.py index 3235df1..e212b0a 100644 --- a/app/core/models/_telegram/templates/player.py +++ b/app/core/models/_telegram/templates/player.py @@ -132,22 +132,22 @@ class PlayerTemplates: # Add thumbnail if cover content is available template_kwargs['thumbnail'] = URLInputFile(cover_content.web_url) - if self.bot_id == 1: + if self.bot_id == 1: pass # Buttons for sharing and opening in app - inline_keyboard_array.append([ - { - 'text': self.user.translated('shareVideo_button'), - 'switch_inline_query': f"Q{user_existing_license.onchain_address}" if user_existing_license else f"C{content.cid.serialize_v2()}", - }, - { - 'text': self.user.translated('shareLink_button'), - 'url': f"https://t.me/share/url?text={urllib.parse.quote(content_share_link['text'])}&url={urllib.parse.quote(content_share_link['url'])}" - } - ]) - inline_keyboard_array.append([{ - 'text': self.user.translated('openTrackInApp_button'), - 'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}/content?startapp={content.cid.serialize_v2()}" - }]) + # inline_keyboard_array.append([ + # { + # 'text': self.user.translated('shareVideo_button'), + # 'switch_inline_query': f"Q{user_existing_license.onchain_address}" if user_existing_license else f"C{content.cid.serialize_v2()}", + # }, + # { + # 'text': self.user.translated('shareLink_button'), + # 'url': f"https://t.me/share/url?text={urllib.parse.quote(content_share_link['text'])}&url={urllib.parse.quote(content_share_link['url'])}" + # } + # ]) + # inline_keyboard_array.append([{ + # 'text': self.user.translated('openTrackInApp_button'), + # 'url': f"https://t.me/{CLIENT_TELEGRAM_BOT_USERNAME}/content?startapp={content.cid.serialize_v2()}" + # }]) else: # Buttons for viewing as a client and opening contract inline_keyboard_array.append([{ @@ -203,7 +203,7 @@ class PlayerTemplates: await self.delete_message(kmsg.message_id) r = await tg_process_template( - self, text, message_id=message_id, **template_kwargs, + self, text + '\n\n' + f"""๐ŸŒ ะžั‚ะบั€ั‹ั‚ัŒ ะฝะฐ MY""", message_id=message_id, **template_kwargs, keyboard=get_inline_keyboard([*inline_keyboard_array, *extra_buttons]) if inline_keyboard_array else None, message_type=f'content/{content_type}', message_meta={'content_sha256': content_meta['hash']} if local_content else {},