This commit is contained in:
user 2024-04-05 15:26:56 +03:00
parent 032b4445a4
commit c90ce0fc70
2 changed files with 3 additions and 2 deletions

View File

@ -46,6 +46,7 @@ class PlayerTemplates:
try:
cover_content = StoredContent.from_cid(self.db_session, content_meta.get('cover_cid') or None)
cd_log += f"Cover content: {cover_content.cid.serialize_v2()}. "
except BaseException as e:
cd_log += f"Can't get cover content: {e}. "
cover_content = None
@ -63,7 +64,7 @@ class PlayerTemplates:
template_kwargs['protect_content'] = True
template_kwargs['audio'] = URLInputFile(local_content_url)
if cover_content:
template_kwargs['thumb'] = URLInputFile(cover_content.web_url)
template_kwargs['thumbnail'] = URLInputFile(cover_content.web_url)
else:
local_content = None

View File

@ -59,7 +59,7 @@ class StoredContent(AlchemyBase, NodeStorageIndexationMixin):
@property
def web_url(self) -> str:
return f"{PROJECT_HOST}/api/v1/storage/{self.cid.serialize_v2()}"
return f"{PROJECT_HOST}/api/v1/storage/{self.cid.serialize_v2(include_accept_type=True)}"
@property
def decrypt_possible(self) -> bool: