Skip to content
Snippets Groups Projects
Commit 39e80160 authored by Hector Blondel's avatar Hector Blondel
Browse files
parents 9a556cd7 9bf55103
No related branches found
No related tags found
No related merge requests found
...@@ -6,10 +6,15 @@ from json import load,dumps ...@@ -6,10 +6,15 @@ from json import load,dumps
from credentials import KEY 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() t = time()
while True : while True :
tt = time() tt = time()
if tt - t > 5. : if tt - t > 5. :
print("actualisation ...")
t = tt t = tt
with open("playlists.json",'r') as f : with open("playlists.json",'r') as f :
...@@ -32,12 +37,14 @@ while True : ...@@ -32,12 +37,14 @@ while True :
os.system(command) os.system(command)
seen_videos.append(vid) seen_videos.append(vid)
i += 1 i += 1
os.chdir("../") os.chdir("../")
with open('seen.json','w') as f2 : with open('seen.json','w') as f2 :
f2.write(dumps(seen_videos)) f2.write(dumps(seen_videos))
os.chdir("../")
os.chdir("../")
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment