[mod] migration of some engine results to the video class (#6743)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser
2026-09-20 16:20:15 +02:00
committed by Markus Heiser
parent ce48993997
commit 2e41cf7407
22 changed files with 93 additions and 132 deletions

View File

@@ -2,7 +2,6 @@
"""Utility functions for the engines"""
from hashlib import pbkdf2_hmac
import time
import re
import importlib
@@ -816,15 +815,6 @@ def parse_duration_string(duration_str: str) -> timedelta | None:
return None
# Format the video duration
def format_duration(duration: str | int) -> str:
seconds = int(duration)
length = time.gmtime(seconds)
if length.tm_hour:
return time.strftime("%H:%M:%S", length)
return time.strftime("%M:%S", length)
def _array_startswith(arr: bytes, prefix: bytes) -> bool:
return arr[: len(prefix)] == prefix