From 71b11e270448eec7d106135cdd2196b44c0ad2d1 Mon Sep 17 00:00:00 2001 From: zenfyr Date: Fri, 20 Feb 2026 22:30:36 +0700 Subject: [PATCH] fix: media duration is optional --- cross/media.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cross/media.py b/cross/media.py index e8bfda4..c86d65d 100644 --- a/cross/media.py +++ b/cross/media.py @@ -172,5 +172,5 @@ def get_media_meta(bytes: bytes) -> MediaInfo: return MediaInfo( width=int(media["width"]), height=int(media["height"]), - duration=float(media.get("duration", probe["format"].get("duration"))), + duration=media.get("duration", probe["format"].get("duration")), ) -- 2.51.2