fix converting mp4
This commit is contained in:
parent
9adc4c2bd0
commit
2a97a9914d
|
|
@ -211,7 +211,7 @@ async def s_api_v1_storage_get(request, file_hash=None):
|
|||
|
||||
elif content_type == 'video':
|
||||
# Build a temp path for the video
|
||||
tempfile_path += "_mp4" + (f"_{seconds_limit}" if seconds_limit else "")
|
||||
tempfile_path += "_mp4" + (f"_{seconds_limit}" if seconds_limit else "") + ".mp4"
|
||||
if not os.path.exists(tempfile_path):
|
||||
try:
|
||||
# Use ffmpeg to cut or convert to mp4
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use
|
|||
if content_type_declared == 'audio':
|
||||
content_list.append(
|
||||
types.InlineQueryResultAudio(
|
||||
id=f"NC_{content.id}",
|
||||
audio_url=decrypted_content.web_url + '?seconds_limit=30',
|
||||
id=f"NC_{content.id}_{int(datetime.now().timestamp() // 60)}",
|
||||
audio_url=encrypted_content.meta['telegram_file_cache'],
|
||||
title=title,
|
||||
performer=performer,
|
||||
caption=hashtags_str + user.translated('p_playerContext_preview'),
|
||||
|
|
@ -159,7 +159,7 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use
|
|||
elif content_type_declared == 'video':
|
||||
content_list.append(
|
||||
types.InlineQueryResultCachedVideo(
|
||||
id=f"NC_{content.id}",
|
||||
id=f"NC_{content.id}_{int(datetime.now().timestamp() // 60)}",
|
||||
video_file_id=encrypted_content.meta['telegram_file_cache'],
|
||||
title=title,
|
||||
caption=hashtags_str + user.translated('p_playerContext_preview'),
|
||||
|
|
|
|||
|
|
@ -128,6 +128,8 @@ class PlayerTemplates:
|
|||
inline_keyboard_array = []
|
||||
extra_buttons = []
|
||||
else:
|
||||
text = ' '.join([f"#{_h}" for _h in content_metadata_json.get('hashtags', [])]).strip()
|
||||
|
||||
user_wallet_address = self.user.wallet_address(self.db_session)
|
||||
have_access = (
|
||||
(content.owner_address == user_wallet_address)
|
||||
|
|
|
|||
Loading…
Reference in New Issue