diff --git a/download_server.py b/download_server.py index 06d3c09840f9a2d6ebc7dca6c871e0a897257370..832068ef136dc501ad9d0bba412cc22afe899cb5 100644 --- a/download_server.py +++ b/download_server.py @@ -6,10 +6,15 @@ from json import load,dumps from credentials import KEY +#commande test : "yt-dlp -f 'ba' -x --audio-format mp3 https://www.youtube.com/watch?v=zA2YBT9z6pA -o '%(id)s.mp3' " + t = time() while True : tt = time() if tt - t > 5. : + + print("actualisation ...") + t = tt with open("playlists.json",'r') as f : @@ -32,12 +37,14 @@ while True : os.system(command) seen_videos.append(vid) i += 1 - os.chdir("../") with open('seen.json','w') as f2 : f2.write(dumps(seen_videos)) + os.chdir("../") + os.chdir("../") + """