parent
51484ca401
commit
016feae60b
@ -1,8 +1,18 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
def cleanup():
|
def cleanup() -> int:
|
||||||
|
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)
|
||||||
for f in files:
|
for f in files:
|
||||||
os.remove(f)
|
os.remove(f)
|
||||||
|
|
||||||
|
for file in os.listdir('./assets/temp/mp4'):
|
||||||
|
count += 1
|
||||||
|
os.remove('./assets/temp/mp4/' + file)
|
||||||
|
for file in os.listdir('./assets/temp/mp3'):
|
||||||
|
count += 1
|
||||||
|
os.remove('./assets/temp/mp3/' + file)
|
||||||
|
return count
|
||||||
|
|
||||||
|
Loading…
Reference in new issue