From e798e92d96b7b1300f6d921620f9b0a297336f13 Mon Sep 17 00:00:00 2001 From: Zen <46526140+master-of-zen@users.noreply.github.com> Date: Mon, 16 Mar 2020 08:39:14 +0200 Subject: [PATCH] Added -keep . Leaving temporally folder after encoding is done --- av1an.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/av1an.py b/av1an.py index a7a8797..be51dce 100755 --- a/av1an.py +++ b/av1an.py @@ -82,7 +82,7 @@ class Av1an: parser.add_argument('--scenes', '-s', type=str, default=self.scenes, help='File location for scenes') parser.add_argument('--resume', '-r', help='Resuming previous session', action='store_true') parser.add_argument('--no_check', '-n', help='Do not check encodings', action='store_true') - + parser.add_argument('--keep', help='Keep temporally folder after encode', action='store_true') # Pass command line args that were passed self.args = parser.parse_args() @@ -485,7 +485,8 @@ class Av1an: self.log('Concatenated\n') # Delete temp folders - shutil.rmtree(self.temp_dir) + if not self.args.keep: + shutil.rmtree(self.temp_dir) except Exception: print('Concatenation failed')