a4k-openproject / plugin.program.openwizard

OpenWizard is a Kodi maintenance wizard, including cleaning, viewing logs, persisting user data, and even full backup/restore features.
GNU General Public License v3.0
89 stars 155 forks source link

Add Enable Addons feature (Initial commit) - Attributed Slamious/BYB … #115

Closed DaedalusBLN closed 3 years ago

DaedalusBLN commented 3 years ago

Pasting the text I sent you as reference...

So basically the only thing that changed is Kodi itself, more specifically how it handles AutoExec. You can't just put in an autoexec.py under userdata that will run no matter what after a build installation (even when the addons database is not overwritten during installation). I implemented a rough fix that will keep your functionality/behaviour as is and will non-destructively also support builds that do not overwrite the addons database or have addons that would need to be manually enabled. I made sure to utilize functions present in the wizard, the only one that did not work is the latest_db in db.py. Should I make a pull request on an otherwise unmodified fork? If you don't like my code you can edit it.

The only thing that can be optimised is the code in AddonsEnable.py as it has a hardcoded filename for the addons database. (Addons33.db)

I see a latest_db function in db.py but I did not manage to get it to work, so for the time being this only patches Addons33.db

Thanks for your correspondence.

DaedalusBLN commented 3 years ago

Closing this as your implementation is way more clean :) Thanks again for making this available in mainline. Opens up new possibilities.