Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've implemented a Top Games feature for tadpole where the user can supply a list of games via TopGames.txt and have those games sorted and placed at the top of the games listing.
Here are the details on the changes made:
tadpoleConfig.py
changes:_static_topGamesEnabled
with default to FalsegetTopGamesEnabled
andsetTopGamesEnabled
to read and set the new config optionSettingsDialog.py
changes:topGamesToggled
which callstpConf.setTopGamesEnabled
in tadpole_configtadpole_functions.py
changes:read_top_games
which reads the TopGames.txt file and returns it as a dictionary, with a list of games for each systemtadpole.py
changes:read_top_games
fromtadpole_functions.py
RunFrogTool
modified to get thetop_games_list
and pass it tofrogtool.process_sys
if Top Games feature is enabledloadROMsToTable
modified to display top games if Top Games feature is enabledfrogtool.py
changes:process_sys
takes an additional parameter: top_games which defaults to an empty list, which is passed towrite_index_file
write_index_file
will re-sort the games with top games if feature is enabled, before metadata pointers are generatedAdded error handling to gracefully handle cases where the
TopGames.txt
file is missing or improperly formatted.Conducted thorough testing to ensure the new feature functions as intended without disrupting existing functionality.