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