fix
This commit is contained in:
parent
ad9e4b2d56
commit
410cfe320b
|
|
@ -22,6 +22,7 @@ async def t_callback_owned_content(query: types.CallbackQuery, memory=None, user
|
||||||
content_list = []
|
content_list = []
|
||||||
for content in db_session.query(StoredContent).filter_by(
|
for content in db_session.query(StoredContent).filter_by(
|
||||||
owner_address=user.wallet_address(db_session),
|
owner_address=user.wallet_address(db_session),
|
||||||
|
type='onchain/content'
|
||||||
).all():
|
).all():
|
||||||
try:
|
try:
|
||||||
metadata_content = StoredContent.from_cid(db_session, content.json_format()['metadata_cid'])
|
metadata_content = StoredContent.from_cid(db_session, content.json_format()['metadata_cid'])
|
||||||
|
|
|
||||||
|
|
@ -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._utils.tg_process_template import tg_process_template
|
||||||
from app.core._config import PROJECT_HOST
|
from app.core._config import PROJECT_HOST
|
||||||
from app.core._keyboards import get_inline_keyboard
|
from app.core._keyboards import get_inline_keyboard
|
||||||
|
from aiogram.types import URLInputFile
|
||||||
|
|
||||||
|
|
||||||
class PlayerTemplates:
|
class PlayerTemplates:
|
||||||
|
|
@ -51,9 +52,9 @@ class PlayerTemplates:
|
||||||
template_kwargs['title'] = 'title'
|
template_kwargs['title'] = 'title'
|
||||||
template_kwargs['performer'] = 'performer'
|
template_kwargs['performer'] = 'performer'
|
||||||
template_kwargs['protect_content'] = True
|
template_kwargs['protect_content'] = True
|
||||||
template_kwargs['audio'] = local_content_url
|
template_kwargs['audio'] = URLInputFile(local_content_url)
|
||||||
if cover_content:
|
if cover_content:
|
||||||
template_kwargs['thumbnail'] = cover_content.web_url
|
template_kwargs['thumbnail'] = URLInputFile(cover_content.web_url)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
local_content = None
|
local_content = None
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue