# HG changeset patch # User mdd # Date 1512659740 -3600 # Node ID 078802773343fc91b9ea9ee881208f35142d705a # Parent a1bc7549699265541e88d13e9c65da953ad5d344 ignore bad cropdetect, cancel crop when detection suggests X cropping diff -r a1bc75496992 -r 078802773343 ts2mkv.py --- a/ts2mkv.py Thu Nov 30 00:20:52 2017 +0100 +++ b/ts2mkv.py Thu Dec 07 16:15:40 2017 +0100 @@ -204,6 +204,14 @@ failcount = 0 for line in lines: tmp = line[line.find(" crop="):].strip() + # crop=1920:804:0:138 + if len(tmp.split(":")) != 4: + print "Warning, invalid cropdetect: %s" % tmp + return None + if tmp.split(":")[2] != "0": + print "!!! X crop detected, disabling autocrop (%s)" % tmp + self.info["msg_prepare"] += "WARNING: cropdetect suggested X crop, disabling autocrop\n" + return None #print "DEBUG: " + tmp if not option: option = tmp