Update send_video.py

This commit is contained in:
Starter 2025-08-26 21:58:08 +05:30 committed by GitHub
parent cb38d6a02b
commit d7f9ea1afe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -335,6 +335,11 @@ class SendVideo:
)
else:
media = utils.get_input_media_from_file_id(video, FileType.VIDEO, ttl_seconds=(1 << 31) - 1 if view_once else ttl_seconds)
if vidcover_file is not None:
try:
media.video_cover = vidcover_file
except Exception as e:
pass
media.spoiler = has_spoiler
else:
thumb = await self.save_file(thumb)