From bf882b741fc4c52b5047a0837f11108cc4483404 Mon Sep 17 00:00:00 2001 From: Javanaut Date: Sun, 2 Feb 2025 12:19:36 +0100 Subject: [PATCH] ff --- src/ffx/file_properties.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ffx/file_properties.py b/src/ffx/file_properties.py index f1ce2db..11da786 100644 --- a/src/ffx/file_properties.py +++ b/src/ffx/file_properties.py @@ -230,15 +230,19 @@ class FileProperties(): errorLines = ffprobeError.split('\n') - cropHistogram = {} + crops = {} for el in errorLines: cropdetect_match = re.search(FileProperties.CROPDETECT_PATTERN, el) if cropdetect_match is not None: - print(cropdetect_match.group(0)) + cropParam = str(cropdetect_match.group(0)) + crops[cropParam] = crops.get(cropParam, 0) + 1 + cropHistogram = sorted(crops) + + print(cropHistogram[0]) # return json.loads(ffprobeOutput)['streams']