dev@locazia: converting media

This commit is contained in:
user committed 2024-04-05 18:22:27 +03:00
1 parent f83855a296
commit 084ae0850d
2 files changed
+64 -3

No files matched your search

+10 -3
View File
@@ -88,9 +88,16 @@ class PlayerTemplates:
inline_keyboard_array = []
extra_buttons = []
else:
have_access = False
user_wallet_address = self.user.wallet_address(self.db_session)
have_access = (
(content.owner_address == user_wallet_address)
or bool(self.db_session.query(UserContent).filter_by(owner_address=user_wallet_address, status='active', content_id=content.id).first())
)
if not have_access:
inline_keyboard_array.append([{
'text': self.user.translated('buyTrackListenLicense_button').format(price=round(0.15 , 3)),
'callback_data': f'PC_{content.id}'
}])
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(