diff --git a/download_server.py b/download_server.py index 7c2d2b5fc4549d9ab86740c378f48a0237e5dbc8..e7f6696f959500c5381fc333af113a59a0cebc34 100644 --- a/download_server.py +++ b/download_server.py @@ -75,14 +75,14 @@ while True : os.system('sudo echo "\n la dernière actualisation date de : " >> history.txt') os.system('date >> history.txt') t = tt - with open("playlists.json",'r') as f : + with open("playlists.json",'r') as ff : - data = load(f) + data = load(ff) for playlist in data : if playlist not in os.listdir("musics"): print("La playlist " + playlist + " n\'est pas dans le repertoire" ) - os.chdir("musics") + os.chdir("musics") os.mkdir(playlist) os.chdir(playlist) @@ -98,7 +98,8 @@ while True : #A supprimer lorsque tout le code aura �t� fait proprement if "seen_names.json" not in os.listdir("musics/"+playlist): print("seen_names.json n\'est pas dans le r�pertoire de la playlist") - with open("musics/"+playlist+"/seen_names.json",'w') as f : + + with open("musics/"+playlist+"/seen_names.json",'w') as f : f.write("[]") os.chdir("musics/"+playlist) @@ -132,7 +133,7 @@ while True : i += 1 os.chdir("../") - with open('seen.json','w') as f2 : + with open('seen.json','w') as f : f2.write(dumps(seen_videos)) with open('seen_names.json','w') as f :