Ajout dans le code de la création du dossier downloads si ce dernier n'existe pas
This commit is contained in:
parent
cfd041495c
commit
fab1815e7f
4
app.py
4
app.py
@ -13,6 +13,10 @@ def process_file(urls):
|
|||||||
download_param_album = '{artist}/{album}/{artist} - {title}'
|
download_param_album = '{artist}/{album}/{artist} - {title}'
|
||||||
download_param_playlist = '{playlist}/{artists}/{album} - {title} {artist}'
|
download_param_playlist = '{playlist}/{artists}/{album} - {title} {artist}'
|
||||||
|
|
||||||
|
# Créer le dossier 'downloads' s'il n'existe pas
|
||||||
|
if not os.path.exists('downloads'):
|
||||||
|
os.makedirs('downloads')
|
||||||
|
|
||||||
os.chdir('downloads')
|
os.chdir('downloads')
|
||||||
os.system(f'rm -rf *')
|
os.system(f'rm -rf *')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user