From bced3106084ad05a8c5cdc91972f3e137382ac30 Mon Sep 17 00:00:00 2001 From: Jason Lobo Date: Sun, 1 Nov 2020 19:38:27 +0000 Subject: [PATCH] Delete VTT and SRT files --- base.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/base.py b/base.py index c2a065c..37d05fb 100644 --- a/base.py +++ b/base.py @@ -34,6 +34,17 @@ for file in [x for x in Path(__file__).parent.glob('**/*.srt') if x.is_file()]: # convert - convert from .srt to .cnt convert.convert() + +# delete .vtt files +for file in [x for x in Path(__file__).parent.glob('**/*.vtt') if x.is_file()]: + file.unlink() + + +# delete .srt files +for file in [x for x in Path(__file__).parent.glob('**/*.srt') if x.is_file()]: + file.unlink() + + # information print(str(len(urls_yt)) + ' subtitle files requested') print(str(len([x for x in Path(__file__).parent.glob('**/*.vtt') if x.is_file()])) + ' .vtt subtitle files in this folder')