@@ -502,6 +502,34 @@ def assets_get_path_noext_SUFIX(Asset, AssetPath, asset_base_noext, objectID = '
502502
503503 return asset_path_noext_FileName
504504
505+ # Get the asset path noext. Used in ScrapeStrategy.scrap_CM_asset_all()
506+ # Returns a FileName object.
507+ def assets_get_ROM_path_noext (object_dic , data_dic , asset_ID ):
508+ # Unpack data in data_dic
509+ ROM_FN = data_dic ['ROM_FN' ]
510+ platform = data_dic ['platform' ]
511+ categoryID = data_dic ['categoryID' ]
512+ launcherID = data_dic ['launcherID' ]
513+ settings = data_dic ['settings' ]
514+ launchers = data_dic ['launchers' ]
515+
516+ # Misc data
517+ asset_info = assets_get_info_scheme (asset_ID )
518+
519+ # Compute asset_path_noext_FN and return.
520+ if categoryID == VCATEGORY_FAVOURITES_ID :
521+ asset_dir_FN = FileName (settings ['favourites_asset_dir' ])
522+ asset_path_noext_FN = assets_get_path_noext_SUFIX (asset_info , asset_dir_FN , ROM_FN .getBaseNoExt (), object_dic ['id' ])
523+ elif categoryID == VCATEGORY_COLLECTIONS_ID :
524+ asset_dir_FN = FileName (settings ['collections_asset_dir' ])
525+ temp_str = assets_get_collection_asset_basename (asset_info , ROM_FN .getBaseNoExt (), platform , '.png' )
526+ asset_path_noext_FN = asset_dir_FN .pjoin (FileName (temp_str ).getBaseNoExt ())
527+ else :
528+ asset_dir_FN = FileName (launchers [launcherID ][asset_info .path_key ])
529+ asset_path_noext_FN = assets_get_path_noext_DIR (asset_info , asset_dir_FN , ROM_FN )
530+ # log_debug('assets_get_ROM_path_noext() Return {}'.format(asset_path_noext_FN.getPath()))
531+ return asset_path_noext_FN
532+
505533# Returns the basename of a collection asset as a FileName object.
506534# Example: 'Super Mario Bros_nes_title.png'
507535#
@@ -544,9 +572,7 @@ def asset_get_unconfigured_name_list(configured_bool_list):
544572
545573 return unconfigured_name_list
546574
547- #
548575# Get a list of assets with duplicated paths. Refuse to do anything if duplicated paths found.
549- #
550576def asset_get_duplicated_dir_list (launcher ):
551577 duplicated_bool_list = [False ] * len (ROM_ASSET_ID_LIST )
552578 duplicated_name_list = []
0 commit comments