From a4e25b5ec83992d1daed887accb708328941b020 Mon Sep 17 00:00:00 2001 From: Javanaut Date: Sun, 2 Feb 2025 12:16:38 +0100 Subject: [PATCH] ff --- src/ffx/file_properties.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ffx/file_properties.py b/src/ffx/file_properties.py index b72563e..f1ce2db 100644 --- a/src/ffx/file_properties.py +++ b/src/ffx/file_properties.py @@ -16,6 +16,8 @@ class FileProperties(): SEASON_EPISODE_INDICATOR_MATCH = '[sS]([0-9]+)[eE]([0-9]+)' EPISODE_INDICATOR_MATCH = '[eE]([0-9]+)' + CROPDETECT_PATTERN = 'crop=[0-9]+:[0-9]+:[0-9]+:[0-9]+$' + DEFAULT_INDEX_DIGITS = 3 def __init__(self, context, sourcePath): @@ -228,9 +230,15 @@ class FileProperties(): errorLines = ffprobeError.split('\n') + cropHistogram = {} for el in errorLines: - print(el) + cropdetect_match = re.search(FileProperties.CROPDETECT_PATTERN, el) + + if cropdetect_match is not None: + print(cropdetect_match.group(0)) + + # return json.loads(ffprobeOutput)['streams']