diff --git a/files/app/partial/local-and-neighbor-devices.ut b/files/app/partial/local-and-neighbor-devices.ut
index 25e6e26d..f435b6e3 100755
--- a/files/app/partial/local-and-neighbor-devices.ut
+++ b/files/app/partial/local-and-neighbor-devices.ut
@@ -139,6 +139,17 @@
else {
push(nlist, { name: (tracker && tracker.hostname) || `|${link.remoteIP}`, tracker: tracker, link: link });
}
+ delete trackers[link.remoteIP];
+ }
+ for (let remoteIP in trackers)
+ {
+ const tracker = trackers[remoteIP];
+ if (tracker.type == "DtD" && tracker.distance < 100) {
+ push(llist, { name: tracker.hostname || `|${remoteIP}`, tracker: tracker, link: null });
+ }
+ else {
+ push(nlist, { name: tracker.hostname || `|${remoteIP}`, tracker: tracker, link: null });
+ }
}
if (length(llist) > 0) {
sort(llist, (a, b) => a.name == b.name ? 0 : a.name < b.name ? -1 : 1);
@@ -153,8 +164,8 @@
else {
print(`
`);
}
- const lq = link.lossMultiplier ? (min(100, int(100 * link.linkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
- const nlq = link.lossMultiplier ? (min(100, int(100 * link.neighborLinkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
+ const lq = link && link.lossMultiplier ? (min(100, int(100 * link.linkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
+ const nlq = link && link.lossMultiplier ? (min(100, int(100 * link.neighborLinkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
if (substr(entry.name, 0, 1) !== "|") {
print(`
`);
}
@@ -195,8 +206,8 @@
else {
print(`
`);
}
- const lq = link.lossMultiplier ? (min(100, int(100 * link.linkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
- const nlq = link.lossMultiplier ? (min(100, int(100 * link.neighborLinkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
+ const lq = link && link.lossMultiplier ? (min(100, int(100 * link.linkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
+ const nlq = link && link.lossMultiplier ? (min(100, int(100 * link.neighborLinkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
let icon = "";
let title = "";
switch (tracker && tracker.type || "Unknown") {