@ -1,7 +1,9 @@
import os
from os.path import exists
def cleanup() -> int:
if exists('./assets/temp'):
count = 0
files = [f for f in os.listdir('.') if f.endswith('.mp4') and 'temp' in f.lower()]
count += len(files)
@ -17,4 +19,5 @@ def cleanup() -> int:
count += 1
os.remove('./assets/temp/mp3/' + file)
return count
return 0