ajour / ajour

A World of Warcraft addon manager written in Rust.
GNU General Public License v3.0
1.02k stars 87 forks source link

WeakAuras/Plater/etc "update" support detects deleted versions as if they still need updates #677

Open Arcitec opened 3 years ago

Arcitec commented 3 years ago

Hi, I assume that the current code just scans the savedvariables Lua for all the wago.io URLs it can find, and looks for newer versions of those URLs.

The problem is: Plater keeps the outdated versions in a "Recycle Bin/Trash Bin" for 30 days, and you can't manually delete them from there.

Ajour permanently detects the recycle bin contents and permanently warns about outdated Plater mods/scripts.

Here is an easy way to reproduce this bug:

  1. Install SweetPlates (a huge mod collection for Plater): https://wago.io/4J866e8CW
  2. Run Ajour's update, it will detect a handful of outdated mods/scripts.
  3. Go ingame and apply the updates, ensuring that you say "Yes overwrite" to the old mods/script that you update. In some cases, Plater bugs out and creates a duplicate of the mod/script, in which case you have to read through the list and manually Delete the older version in Plater.
  4. When you are done, your Recycle bin (recycling iucon at the top left of the Plater GUI, within the Modding/Scripts tabs), should contain a bunch of outdated, deleted things.
  5. Close the game or /reloadui to save the variables.
  6. Run an Ajour scan. It will still say that updates exist for the things that you just updated.

So yeah, I assume it's currently just doing a URL scan in the savedvars and isn't looking at the structure of the saved data, so it isn't understanding that some things are in the ingame recycle bin and should be ignored by the update checker.

This is probably annoying to fix, if indeed Ajour doesn't have a Lua table (savedvar) parser that can parse the structure and ignore certain sections of the savedvars... :-/

casperstorm commented 3 years ago

@tarkah can you eventually take a look at this?

tarkah commented 3 years ago

We do parse the lua table so this is something that can be easily accounted for. @bananaman, if you can find the field we need to account for, that'd be a big help.

tarkah commented 3 years ago

Also, if you can attach your savedvariables file, that'd be a big help.

Arcitec commented 3 years ago

@casperstorm @tarkah

We do parse the lua table so this is something that can be easily accounted for.

That's awesome news. Well, I did find the field!

The path to the trashed data is:

For example, to dump my "SweetPlates" (that's my custom name for my profile) trash bin data in-game, I'd type these:

/dump PlaterDB.profiles["SweetPlates"].script_data_trash

/dump PlaterDB.profiles["SweetPlates"].hook_data_trash

Savedvars are attached to this message. Plater.zip