Skip to content
Snippets Groups Projects
Commit 4cbdd53b authored by Hector Blondel's avatar Hector Blondel
Browse files

modification de l'arboressence

parent 6680348b
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,8 @@ from credentials import KEY ...@@ -8,6 +8,8 @@ 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' " #commande test : "yt-dlp -f 'ba' -x --audio-format mp3 https://www.youtube.com/watch?v=zA2YBT9z6pA -o '%(id)s.mp3' "
os.chdir("/mnt/usb/bleezrdata")
t = time() t = time()
while True : while True :
tt = time() tt = time()
...@@ -22,13 +24,14 @@ while True : ...@@ -22,13 +24,14 @@ while True :
for playlist in data : for playlist in data :
if playlist not in os.listdir("musics"): if playlist not in os.listdir("musics"):
print("une nouvelle playlist a été ajoutée !")
os.chdir("musics") os.chdir("musics")
os.mkdir(playlist) os.mkdir(playlist)
os.chdir("musics") #On remplit le dossier de cette playlist
os.mkdir("contents") os.mkdir("contents")
with open("seen.json",'w') as f : with open("seen.json",'w') as f :
f.write("[]") f.write("[]")
os.chdir("../..") os.chdir("../..")
os.chdir("musics/"+playlist) os.chdir("musics/"+playlist)
...@@ -50,8 +53,6 @@ while True : ...@@ -50,8 +53,6 @@ while True :
i += 1 i += 1
os.chdir("../") os.chdir("../")
print("mise à jour de seen_videos ...")
print(seen_videos)
with open('seen.json','w') as f2 : with open('seen.json','w') as f2 :
f2.write(dumps(seen_videos)) f2.write(dumps(seen_videos))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment