@@ -230,7 +230,7 @@ class INT,
230230
231231# Add Game File data
232232for i in range (1 , 6 ):
233- file = f'fileList-TR{ i } .json'
233+ file = f'data/ fileList-TR{ i } .json'
234234
235235 # Load data from JSON file
236236 with open (file , 'r' , encoding = 'utf-8' ) as json_file :
@@ -249,36 +249,36 @@ class INT,
249249
250250 if relative_path and file_md5 :
251251 # Check if the file with the same md5sum already exists in File table
252- C .execute ("SELECT FileID FROM File WHERE md5sum = ? AND path = ?" , \
253- (file_md5 , relative_path ))
252+ C .execute ("SELECT FileID FROM File WHERE md5sum = ? AND path = ?" ,
253+ (file_md5 , relative_path ))
254254 existing_file = C .fetchone ()
255255
256256 if existing_file :
257257 # File already exists, use the existing FileID
258258 file_id = existing_file [0 ]
259- print ("File with md5sum %s and path %s already exists. Using existing FileID: %s" , \
260- file_md5 , relative_path , file_id )
259+ print ("File with md5sum %s and path %s already exists. Using existing FileID: %s" ,
260+ file_md5 , relative_path , file_id )
261261 else :
262262 # File doesn't exist, insert it into File table
263- C .execute ("INSERT INTO File (md5sum, path) VALUES (?, ?)" , \
264- (file_md5 , relative_path ))
263+ C .execute ("INSERT INTO File (md5sum, path) VALUES (?, ?)" ,
264+ (file_md5 , relative_path ))
265265 file_id = C .lastrowid
266266 print (f"Inserted new file with md5sum { file_md5 } . New FileID: { file_id } " )
267267
268268 try :
269269 # Check if the combination of fileID and gameID already exists in GameFileList
270- C .execute ("SELECT 1 FROM GameFileList WHERE fileID = ? AND gameID = ?" , \
271- (file_id , game_id ))
270+ C .execute ("SELECT 1 FROM GameFileList WHERE fileID = ? AND gameID = ?" ,
271+ (file_id , game_id ))
272272 existing_combination = C .fetchone ()
273273
274274 if not existing_combination :
275275 # Combination doesn't exist, insert it into GameFileList
276- C .execute ("INSERT INTO GameFileList (fileID, gameID) VALUES (?, ?)" , \
277- (file_id , game_id ))
276+ C .execute ("INSERT INTO GameFileList (fileID, gameID) VALUES (?, ?)" ,
277+ (file_id , game_id ))
278278 else :
279279 # Combination already exists, print a message or handle it as needed
280- print (f"Combination of FileID { file_id } and LevelID { game_id } " \
281- "already exists in GameFileList. Skipping insertion." )
280+ print (f"Combination of FileID { file_id } and LevelID { game_id } "
281+ "already exists in GameFileList. Skipping insertion." )
282282
283283 except sqlite3 .IntegrityError as file_list_error :
284284 # Print more details about the uniqueness violation
0 commit comments