@@ -97,23 +97,23 @@ async def import_pictures():
9797
9898 files = list_files_in_dir ('./cache/pictures' )
9999
100- for file in files :
101- if file .endswith (".old" ):
102- with open (f'./cache/pictures/{ file } ' , 'r' , encoding = 'utf-8' ) as fichier :
103- datasOld [file .split ('.' )[0 ]] = json .load (fichier ).get ('data' )
104- else :
105- with open (f'./cache/pictures/{ file } ' , 'r' , encoding = 'utf-8' ) as fichier :
106- datasCurrent [file .split ('.' )[0 ]] = json .load (fichier ).get ('data' )
107-
108- for file in files :
109- if datasOld .get (file .split ('.' )[0 ]) is not None :
110- datas [file .split ('.' )[0 ]] = filter_datas (datasCurrent [file .split ('.' )[0 ]], datasOld [file .split ('.' )[0 ]])
111- else :
112- datas [file .split ('.' )[0 ]] = datasCurrent [file .split ('.' )[0 ]]
113-
114- print (datasOld )
115- print (datasCurrent )
116- print (datas )
100+ # for file in files:
101+ # if file.endswith(".old"):
102+ # with open(f'./cache/pictures/{file}', 'r', encoding='utf-8') as fichier:
103+ # datasOld[file.split('.')[0]] = json.load(fichier).get('data')
104+ # else:
105+ with open (f'./cache/pictures/{ file } ' , 'r' , encoding = 'utf-8' ) as fichier :
106+ datasCurrent [file .split ('.' )[0 ]] = json .load (fichier ).get ('data' )
107+
108+ # for file in files:
109+ # if datasOld.get(file.split('.')[0]) is not None:
110+ # datas[file.split('.')[0]] = filter_datas(datasCurrent[file.split('.')[0]], datasOld[file.split('.')[0]])
111+ # else:
112+ datas [file .split ('.' )[0 ]] = datasCurrent [file .split ('.' )[0 ]]
113+
114+ # print(datasOld)
115+ # print(datasCurrent)
116+ # print(datas)
117117
118118 async with aiohttp .ClientSession () as session :
119119 tasks = [process_data (datas [entry ], entry , session ) for entry in datas ]
0 commit comments