From d905f7be3a47a981fc7db76272c6687f5f12e38a Mon Sep 17 00:00:00 2001 From: Urban Wallasch Date: Thu, 20 May 2021 15:19:20 +0200 Subject: [PATCH] * Fixed chk_idxfile() testing for non-applicable method parameters. --- ffpreview.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/ffpreview.py b/ffpreview.py index 4b91a23..7953157 100755 --- a/ffpreview.py +++ b/ffpreview.py @@ -1290,14 +1290,18 @@ def chk_idxfile(thinfo, thdir): return False if idx['method'] != thinfo['method']: return False - if idx['frame_skip'] != thinfo['frame_skip']: - return False - if idx['time_skip'] != thinfo['time_skip']: - return False - if idx['scene_thresh'] != thinfo['scene_thresh']: - return False - if idx['customvf'] != thinfo['customvf']: - return False + if idx['method'] == 'skip': + if not 'frame_skip' in idx or idx['frame_skip'] != thinfo['frame_skip']: + return False + elif idx['method'] == 'time': + if not 'time_skip' in idx or idx['time_skip'] != thinfo['time_skip']: + return False + elif idx['method'] == 'scene': + if not 'scene_thresh' in idx or idx['scene_thresh'] != thinfo['scene_thresh']: + return False + elif idx['method'] == 'customvf': + if not 'customvf' in idx or idx['customvf'] != thinfo['customvf']: + return False return idx except Exception as e: eprint(1, idxpath, str(e)) -- 2.30.2