-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculating hash as a way to determine version #67
Comments
Hi casualshammy. Thanks for your suggestion to use hashing as a kind of fingerprinting to detect version changes independent of actual version reported by local addon and the api's we query. This prompted us to discuss it internally (@casperstorm and I) and we sort of broke it down into a couple of scenarios. Scenario 1a: To handle addons that don't have a version in toc
We do not think this would be a good idea, since it would mean initiating a lot of downloads (some addons are huge) without the user expecting it. Another issue with that is that we currently use the absence of a version in the toc file to indicate the addon should not be displayed as it is a "sub-addon". For example: Bagnon's "BagBrother" folder. Scenario 1b: To handle addons that report wrong version in toc (always update-able)
For the same reason as 1a we don't want to initiate any downloads without user consent. And it would be a lot of effort to fix what is essentially a mistake on behalf of the addon author who forgot to bump the version in the toc file. Scenario 2: Use api provided fingerprint and compare with computed fingerprint of local addon
Doing this could potentially detect rare instances were Ajour wrongly thinks the local version is the same as the remote version. But it would rely on a reverse-enginereed hash algorithm and be very api dependent. But we appreciate the suggestion, and perhaps there are other ways in which we could use hashing to improve Ajour, that we haven't thought of! EDIT: As a workaround to addons that are "always update-able" due to wrong version specified in toc file, I can recommend the ignore function in Ajour's settings. It will hide the addon from the list and exclude it from the update all action. |
Ah, I forgot about subfolders... But what if
Why I think you can't rely on |
Looks like you've discovered another edge case we weren't aware of! :) Death Note is also on Curseforge but it looks like the title in the toc (DeathNote) is different from the title in the api (Death Note) so we don't find it when we search for it. I think this would also be a problem using wowace, because if I search for DeathNote there I get no results.
We would really (really) like to avoid maintaining a "state" between executions of ajour, though the ignore/unignore feature does violate that principle slightly. So we came up with logic to (try to) achieve that without actually knowing anything about what the original download contained. And this is how it looks at the moment: It roughly goes like this: The gui then does some extra grouping of addons if they have the same id (so that downloads like "Deadly Boss Mods (DBM) - Legion" don't show up as 7 addons). It's not perfect, but it works surprisingly well. Of the 99 most popular addons on curseforge, 91 are displayed correctly, 4 are hidden due to missing version in toc, and 4 are hidden because they are considered sub addons (HandyNotes and Atlas extensions)
I think this is a good idea for a future enhancement! We should consider showing (somewhere) a list of addons that are not considered dependencies of any shown addon, and perhaps allow the user to force an update of those. |
Maybe I explained my idea wrong (you don't need to save any information between sessions), but I can understand your focus on app performance. I just personally prefer to make it slower, but more reliable :) Unfortunately, I don't know Rust, so I cannot break something in your program (ha-ha). |
Hello.
I guess it is really difficult to determine version of addons on third-party websites, so thank you for your hard work.
As a 'last solution', could you consider using any hash algoritm? Something like option "Use hashing algoritm to determine addon version". It straitforward way to handle cases like Easy Scrap - two different versions of this addon have the same
Version
tag in.toc
file. I think you just have not time to ask every addon author to keep information actual.There is a problem in hash calculation - you need to download the latest file, unzip it and then do hashing on folder(s). It may be network- (and sometimes CPU-) intensive, but it worth its purpose.
The text was updated successfully, but these errors were encountered: