Skip to content
Snippets Groups Projects
Commit 13cf900d authored by BuildTools's avatar BuildTools
Browse files

dernières modifs sur download_server.py

parent 5a92a8cf
No related branches found
No related tags found
No related merge requests found
......@@ -47,8 +47,8 @@ def addplaylist(playlistid):
data.append({'id':playlistid,'name':playlistname})
with open("playlistinfo.json",'w') as f :
f.write(dumps(data))
with open("playlistinfo.json",'w') as f2 :
f2.write(dumps(data))
with open("playlists.json",'r') as f :
data = load(f)
......@@ -62,7 +62,6 @@ def addplaylist(playlistid):
addplaylist("PL8V2Ld0Is1-kUaNtXmvYGtYoyZ0O2aqDt")
os.chdir("/mnt/usb/bleezrdata")
......@@ -110,10 +109,10 @@ while True :
all_videos = [x['snippet']['resourceId']['videoId'] for x in dico['items']]
all_videos_names = [x['snippet']['title'] for x in dico['items']]
#print("longueur de all_videos : {}".format(len(all_videos)))
with open('seen.json','r') as f2 :
seen_videos = load(f2)
with open('seen_names.json','r') as f3 :
seen_videos_names = load(f3)
with open('seen.json','r') as f :
seen_videos = load(f)
with open('seen_names.json','r') as f :
seen_videos_names = load(f)
os.chdir("contents")
i = 0
......@@ -133,11 +132,11 @@ while True :
i += 1
os.chdir("../")
with open('seen.json','w') as f :
with open('seen.json','w') as f2 :
f2.write(dumps(seen_videos))
with open('seen_names.json','w') as f :
f.write(dumps(seen_videos_names))
with open('seen_names.json','w') as f3 :
f3.write(dumps(seen_videos_names))
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