From 6c5fc9030a1ede8cf610b524cfc42fb250a0e009 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 30 Oct 2018 17:22:08 +0100 Subject: [PATCH] cleanup subtitle --- pandora/archive/extract.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/archive/extract.py b/pandora/archive/extract.py index f206de24..0b27ad02 100644 --- a/pandora/archive/extract.py +++ b/pandora/archive/extract.py @@ -642,5 +642,7 @@ def chop(video, start, end, subtitles=None): p.wait() f = open(choped_video, 'rb') os.unlink(choped_video) + if subtitles_f and os.path.exists(subtitles_f): + os.unlink(subtitles_f) os.rmdir(tmp) return f