mjrgh / PinballY

A table browser and launcher ("front end") for virtual pinball cabinets.
Other
47 stars 22 forks source link

Deleting categories is not working properly #249

Open jueank opened 2 days ago

jueank commented 2 days ago

When deleting a user created category that has been assigned to multiple tables. The category disappears from PinballYs list of categories, but reappears when PinballY is started next time. It seems that PinballY doesnot completely scan through all entries.

Besides of this behavior, I think it would be a welcomed change if PinballY throws out the support & compatibility of PinballX 'database' file (who cares for PinballX in 2024 anyway) and switches to an internal persistence tailored for PinballYs needs. Either file based, or DB based (sqlite?). But not the mixture of PinballX XML file plus gamestats.csv

mjrgh commented 2 days ago

I'll take a look at it. I'm not entirely certain that this is not the intended behavior, in that it might be too dangerous to do the cascading deletes, but It should probably at least warn (and describe the required action to manually delete the cross-references) if this is the case.

I'd definitely love to ditch the legacy PBX XML format and switch to a single, internally consistent database format that doesn't cause insanity when closely inspected. But that would be such a compatibility-breaking change that I think I could only contemplate it for a major version change, at least a whole number change to 2.0 (say), if not a full letter change to Pinball Z.

jueank commented 2 days ago

Why is compatibility a concern? I would suggest implementing it in a way that allows for a one-time migration when upgrading from PinballY 1.x to PinballY 2.0. I may be mistaken, but I don't believe there is a single user who is using PinballY and PinballX in parallel, accessing the same XML database file. You could switch to an internal database implementation and allow a manual or automated sync of the internal database and an external PinballX file, if you really want to keep compatibility.