This commit is contained in:
user committed 2025-03-01 04:05:41 +03:00
1 parent 952c45f4c2
commit 7c947f51b6
4 files changed
+14 -14

No files matched your search

@@ -41,7 +41,7 @@ class PlayerTemplates:
local_content_meta = local_content.json_format()
make_log("TG-Player", f"Content meta: {content_meta}. Local content meta: {local_content_meta}. ")
try:
content_type, content_encoding = local_content_meta["content_type"].split('/')
content_type, content_encoding = "audio", "aac"
except:
content_type, content_encoding = 'application', 'x-binary'
@@ -77,6 +77,9 @@ class PlayerTemplates:
preview_content = db_session.query(StoredContent).filter(
StoredContent.hash == converted_content['low_preview']
).first()
if preview_content.filename.split('.')[-1] in ['mov', 'mp4']:
content_type = 'video'
local_content_preview_url = preview_content.web_url
if content_type == 'audio':
audio_title = content_metadata_json.get('name', "").split(' - ')