diff --git a/subtitles.py b/subtitles.py index 8ce965f..b9d590b 100755 --- a/subtitles.py +++ b/subtitles.py @@ -180,10 +180,10 @@ def render_subtitles(item_json, output_json, output_srt, lang): def overlaps(src, other): - src_in = float('%0.3f' % src['in']) - src_out = float('%0.3f' % src['out']) - other_in = float('%0.3f' % other['in']) - other_out = float('%0.3f' % other['out']) + src_in = float('%0.2f' % src['in']) + src_out = float('%0.2f' % src['out']) + other_in = float('%0.2f' % other['in']) + other_out = float('%0.2f' % other['out']) points = [] if src_in != other_in or src_out != other_out: # src inside @@ -193,6 +193,7 @@ def overlaps(src, other): points += [other['out']] return points + if __name__ == '__main__': if os.path.exists('subtitles.json'): items = json.load(open('subtitles.json'))