@@ -4955,12 +4955,6 @@ def mame_build_MAME_main_database(cfg, st_dic):
49554955
49564956 # --- Save databases ---
49574957 log_info ('Saving database JSON files...' )
4958- if OPTION_LOWMEM_WRITE_JSON :
4959- json_write_func = utils_write_JSON_file_lowmem
4960- log_debug ('Using utils_write_JSON_file_lowmem() JSON writer' )
4961- else :
4962- json_write_func = utils_write_JSON_file
4963- log_debug ('Using utils_write_JSON_file() JSON writer' )
49644958 db_files = [
49654959 [machines , 'MAME machines main' , cfg .MAIN_DB_PATH .getPath ()],
49664960 [renderdb_dic , 'MAME render DB' , cfg .RENDER_DB_PATH .getPath ()],
@@ -4981,7 +4975,7 @@ def mame_build_MAME_main_database(cfg, st_dic):
49814975 # --- Save control_dic after everything is saved ---
49824976 [control_dic , 'Control dictionary' , cfg .MAIN_CONTROL_PATH .getPath ()],
49834977 ]
4984- db_save_files (db_files , json_write_func )
4978+ db_save_files (db_files )
49854979
49864980 # Return a dictionary with references to the objects just in case they are needed after
49874981 # this function (in "Build everything", for example). This saves time, because databases do not
@@ -5545,30 +5539,21 @@ def mame_build_ROM_audit_databases(cfg, st_dic, db_dic_in):
55455539 db_safe_edit (control_dic , 't_MAME_Audit_DB_build' , time .time ())
55465540
55475541 # --- Save databases ---
5548- if OPTION_LOWMEM_WRITE_JSON :
5549- json_write_func = utils_write_JSON_file_lowmem
5550- log_debug ('Using utils_write_JSON_file_lowmem() JSON writer' )
5551- else :
5552- json_write_func = utils_write_JSON_file
5553- log_debug ('Using utils_write_JSON_file() JSON writer' )
55545542 db_files = [
55555543 [audit_roms_dic , 'MAME ROM Audit' , cfg .ROM_AUDIT_DB_PATH .getPath ()],
55565544 [machine_archives_dic , 'Machine file list' , cfg .ROM_SET_MACHINE_FILES_DB_PATH .getPath ()],
55575545 # --- Save control_dic after everything is saved ---
55585546 [control_dic , 'Control dictionary' , cfg .MAIN_CONTROL_PATH .getPath ()],
55595547 ]
5560- db_save_files (db_files , json_write_func )
5548+ db_save_files (db_files )
55615549 # Add data generated in this function to dictionary for caller code use.
55625550 db_dic_in ['audit_roms' ] = audit_roms_dic
55635551 db_dic_in ['machine_archives' ] = machine_archives_dic
55645552
5565- #
55665553# Checks for errors before scanning for SL ROMs.
55675554# Display a Kodi dialog if an error is found.
55685555# Returns a dictionary of settings:
55695556# options_dic['abort'] is always present.
5570- #
5571- #
55725557def mame_check_before_build_MAME_catalogs (cfg , st_dic , control_dic ):
55735558 kodi_reset_status (st_dic )
55745559
@@ -7232,12 +7217,6 @@ def mame_build_SoftwareLists_databases(cfg, st_dic, db_dic_in):
72327217 db_safe_edit (control_dic , 't_SL_DB_build' , time .time ())
72337218
72347219 # --- Save modified/created stuff in this function ---
7235- if OPTION_LOWMEM_WRITE_JSON :
7236- json_write_func = utils_write_JSON_file_lowmem
7237- log_debug ('Using utils_write_JSON_file_lowmem() JSON writer' )
7238- else :
7239- json_write_func = utils_write_JSON_file
7240- log_debug ('Using utils_write_JSON_file() JSON writer' )
72417220 db_files = [
72427221 # Fix this list of files!!!
72437222 [SL_catalog_dic , 'Software Lists index' , cfg .SL_INDEX_PATH .getPath ()],
@@ -7246,18 +7225,16 @@ def mame_build_SoftwareLists_databases(cfg, st_dic, db_dic_in):
72467225 # Save control_dic after everything is saved.
72477226 [control_dic , 'Control dictionary' , cfg .MAIN_CONTROL_PATH .getPath ()],
72487227 ]
7249- db_save_files (db_files , json_write_func )
7228+ db_save_files (db_files )
72507229 db_dic_in ['SL_index' ] = SL_catalog_dic
72517230 db_dic_in ['SL_machines' ] = SL_machines_dic
72527231 db_dic_in ['SL_PClone_dic' ] = SL_PClone_dic
72537232
72547233# -------------------------------------------------------------------------------------------------
72557234# ROM/CHD and asset scanner
72567235# -------------------------------------------------------------------------------------------------
7257- #
72587236# Checks for errors before scanning for SL ROMs.
72597237# Display a Kodi dialog if an error is found.
7260- #
72617238def mame_check_before_scan_MAME_ROMs (cfg , st_dic , options_dic , control_dic ):
72627239 log_info ('mame_check_before_scan_MAME_ROMs() Starting...' )
72637240 kodi_reset_status (st_dic )
0 commit comments