Thanks for the input. That sound like a sensible addition. I will add something like that to get around the "goty" issue. For the other issue with the numbers not matching up, I don't know what could be causing that besides some games that are being hidden are inside your z_Hide category without being marked as "Hidden" before invoking the "Hide All Duplicates" function. Only games that are visible before are set to "hidden" and only those increase the count. If that's not the cause, there must be something else that I am entirely unaware of.
If you want to see which games are being hidden, add this to the end of the "hide_duplicates(args)" function (or "unhide_duplicates(args)").
This will prompt you to save a text file containing a list of all games that were hidden and their categories when "Hide All Duplicates" is executed.
If you want to see which games are being hidden, add this to the end of the "hide_duplicates(args)" function (or "unhide_duplicates(args)").
# Save list to file
s = "\n".join([str((game.Name, ", ".join(
[c.Name for c in game.Categories]) if game.Categories is not None else "None")) for game in updates])
path = PlayniteApi.Dialogs.SaveFile("Text file|*.txt")
if (path is not None and path != ""):
with open(path, "w") as file:
file.write(s)
This will prompt you to save a text file containing a list of all games that were hidden and their categories when "Hide All Duplicates" is executed.