fix
This commit is contained in:
parent
032b4445a4
commit
c90ce0fc70
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue