theypsilon / _arcade-organizer

A script for organizing _Arcade for MiSTer
GNU General Public License v3.0
36 stars 6 forks source link

Script rebuilds every update when alphabetized folders are disabled #64

Closed prenetic closed 1 month ago

prenetic commented 1 month ago

When running the organizer with alphabetized folders disabled, check_if_orgdir_directories_are_missing appears to be invoked regardless and as a result signals Some ORGDIR directories are missing. and rebuilds the entire _Organized folder every time it's run via update_all.

Expected behavior would be to only check for alphabetized directories if enabled.

Pull request opened and linked to issue. Local testing of change exhibits expected behavior, with incremental changes made with alphabetized folders disabled rather than full rebuilds. No change in behavior if alphabetized folders are enabled.

Call from organize method https://github.com/theypsilon/_arcade-organizer/blob/master/_arcade-organizer.sh#L1092-L1095

Criteria for missing ORGDIR directories https://github.com/theypsilon/_arcade-organizer/blob/master/_arcade-organizer.sh#L563-L569

[...]
Running Arcade Organizer

Reading INI (update_arcade-organizer.ini):
OK

Arcade Organizer 2.0
Arguments:
ARCADE_OFFSET_DIRECTORY=/media/fat/_Arcade/_Arcade Offset
AZ_DIR=false
BEST_OF_DIR=true
BOOTLEG=1
CATEGORY_DIR=true
CORE_DIR=true
DECADES_DIR=true
FLIP=true
HOMEBREW=1
MAD_DB=https://raw.githubusercontent.com/Toryalai1/MiSTer_ArcadeDatabase/db/mad_db.json.zip
MANUFACTURER_DIR=true
MOVE_INPUTS_DIR=true
MOVE_INPUTS_NOT_SUPPORTED=[]
MRADIR=/media/fat/_Arcade/
NO_SYMLINKS=false
NUM_BUTTONS_DIR=true
NUM_BUTTONS_MAXIMUM=9999
NUM_MONITORS_DIR=true
ORGDIR=/media/fat/_Arcade/_Organized
PLATFORM_DIR=true
PLAYERS_DIR=true
PLAYERS_NOT_SUPPORTED=[]
PREPEND_YEAR=false
REGION_DIR=true
REGION_MAIN=DEV PREFERRED
REGION_OTHERS=1
RESOLUTION_15KHZ=true
RESOLUTION_24KHZ=true
RESOLUTION_31KHZ=true
RESOLUTION_DIR=true
ROTATION_0=true
ROTATION_180=true
ROTATION_270=true
ROTATION_90=true
ROTATION_DIR=true
SERIES_DIR=true
SKIPALTS=true
SPECIAL_CONTROLS_DIR=true
SPECIAL_CONTROLS_NOT_SUPPORTED=[]
TOPDIR=
VERBOSE=false
YEAR_DIR=true
YEAR_HIGH=9999
YEAR_LOW=0

Downloading Mister Arcade Descriptions database
MD5 Hash: 367752f9b57109cf7aee220b50f841ca

Some ORGDIR directories are missing.

Performing a full build.

Organizing 2054 MRAs.

MRA                                          Core       Year Manufactu. Category
################################################################################
1941- Counter Attack (JP).mra                jtcps1     1990 Capcom     Shooter
1941- Counter Attack (US, 900227).mra        jtcps1     1990 Capcom     Shooter
1941- Counter Attack (W, 900227).mra         jtcps1     1990 Capcom     Shooter
[...]
theypsilon commented 1 month ago

Thanks a lot, merged your PR https://github.com/theypsilon/_arcade-organizer/pull/65