From: Urban Wallasch Date: Thu, 20 May 2021 13:19:20 +0000 (+0200) Subject: * Fixed chk_idxfile() testing for non-applicable method parameters. X-Git-Tag: v0.3~20 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=d905f7be3a47a981fc7db76272c6687f5f12e38a;p=ffpreview.git * Fixed chk_idxfile() testing for non-applicable method parameters. --- 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))