This commit is contained in:
user 2024-04-05 14:59:17 +03:00
parent ad9e4b2d56
commit 410cfe320b
2 changed files with 4 additions and 2 deletions

View File

@ -22,6 +22,7 @@ async def t_callback_owned_content(query: types.CallbackQuery, memory=None, user
content_list = []
for content in db_session.query(StoredContent).filter_by(
owner_address=user.wallet_address(db_session),
type='onchain/content'
).all():
try:
metadata_content = StoredContent.from_cid(db_session, content.json_format()['metadata_cid'])

View File

@ -4,6 +4,7 @@ from app.core.logger import make_log
from app.core._utils.tg_process_template import tg_process_template
from app.core._config import PROJECT_HOST
from app.core._keyboards import get_inline_keyboard
from aiogram.types import URLInputFile
class PlayerTemplates:
@ -51,9 +52,9 @@ class PlayerTemplates:
template_kwargs['title'] = 'title'
template_kwargs['performer'] = 'performer'
template_kwargs['protect_content'] = True
template_kwargs['audio'] = local_content_url
template_kwargs['audio'] = URLInputFile(local_content_url)
if cover_content:
template_kwargs['thumbnail'] = cover_content.web_url
template_kwargs['thumbnail'] = URLInputFile(cover_content.web_url)
else:
local_content = None