aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2023-08-21 20:02:27 +0200
committer0neGal <mail@0negal.com>2023-08-21 20:02:27 +0200
commitf21f17fc0c530b303160b18a5a76a9cb3b8ddbc6 (patch)
treecb856a79707f83671ec26004b66f364fece7449e
parent70bf7b4be2722518c77a6bcc26b6057f5da0f1fb (diff)
downloadViper-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.
-rw-r--r--src/app/js/browser.js18
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;
}
}
}