diff options
author | 0neGal <mail@0negal.com> | 2023-08-21 20:02:27 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2023-08-21 20:02:27 +0200 |
commit | f21f17fc0c530b303160b18a5a76a9cb3b8ddbc6 (patch) | |
tree | cb856a79707f83671ec26004b66f364fece7449e /src/app/js | |
parent | 70bf7b4be2722518c77a6bcc26b6057f5da0f1fb (diff) | |
download | Viper-f21f17fc0c530b303160b18a5a76a9cb3b8ddbc6.tar.gz Viper-f21f17fc0c530b303160b18a5a76a9cb3b8ddbc6.zip |
properly detect installed packages in mod browser
This doesn't break the old way of detecting things, for various reasons,
but notably it'd cause more harm than good. As we still need to be able
to detect packages that haven't been converted into the new location.
Diffstat (limited to 'src/app/js')
-rw-r--r-- | src/app/js/browser.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/app/js/browser.js b/src/app/js/browser.js index ec5013a..fcbdc4f 100644 --- a/src/app/js/browser.js +++ b/src/app/js/browser.js @@ -136,12 +136,18 @@ var Browser = { for (let ii = 0; ii < modsobj.all.length; ii++) { let mod = modsobj.all[ii]; - if (normalize(mod.name) === normalized) { - local_name = mod.name; - local_version = version.format(mod.version); - if (version.is_newer(remote_version, local_version)) { - has_update = true; - } + if (normalize(mod.name) !== normalized && ( + ! mod.package || + mod.package.author + "-" + mod.package.package_name !== + packages[i].full_name + )) { + continue; + } + + local_name = mod.name; + local_version = version.format(mod.version); + if (version.is_newer(remote_version, local_version)) { + has_update = true; } } } |