diff --git a/html/early.js b/html/early.js
index 905dafa..65d92bf 100644
--- a/html/early.js
+++ b/html/early.js
@@ -481,7 +481,7 @@ if (uuid != null) {
if (usp.has('noglobe') || usp.has('ptracks')) {
data.globeIndexGrid = null; // disable globe on user request
}
- dbServer = (data.dbServer && data.globeIndexGrid != null) ? true : false;
+ dbServer = (data.dbServer) ? true : false;
init_zstddec();
diff --git a/html/planeObject.js b/html/planeObject.js
index d15101e..955a125 100644
--- a/html/planeObject.js
+++ b/html/planeObject.js
@@ -1631,8 +1631,9 @@ PlaneObject.prototype.updateData = function(now, last, data, init) {
this.nogps = data.nogps;
}
this.rId = data.rId;
-
- this.checkForDB(data);
+ if (!this.dbinfoLoaded) {
+ this.checkForDB(data);
+ }
this.last = now;
this.updatePositionData(now, last, data, init);
return;
@@ -2786,11 +2787,10 @@ PlaneObject.prototype.checkForDB = function(t) {
if (t.r) this.registration = `${t.r}`;
if (t.r || t.t) {
- //console.log('fromTrace');
this.dbinfoLoaded = true;
}
}
- if (!this.dbinfoLoaded && (!dbServer || (dbServer && !globeIndex && this.selected) || replay)) {
+ if (!this.dbinfoLoaded && (!dbServer || replay)) {
this.getAircraftData();
return;
}
diff --git a/html/script.js b/html/script.js
index 4df8c4d..a4b9e37 100644
--- a/html/script.js
+++ b/html/script.js
@@ -558,6 +558,11 @@ function fetchData(options) {
}
});
}
+
+
+ if (now - lastReap > 60) {
+ reaper();
+ }
}
// this function is called from index.html on body load
@@ -4003,7 +4008,7 @@ function select(plane, options) {
function selectPlaneByHex(hex, options) {
active();
- console.log("SELECTING", hex, options);
+ console.log(`SELECTING ${hex}`);
options = options || {};
//console.log("select: " + hex);
// If SelectedPlane has something in it, clear out the selected
@@ -4015,8 +4020,9 @@ function selectPlaneByHex(hex, options) {
// plane to be selected
let newPlane = Planes[hex];
- if (!options.noFetch && globeIndex && hex)
+ if (!options.noFetch && globeIndex && hex) {
newPlane = getTrace(newPlane, hex, options);
+ }
// If we are clicking the same plane, we are deselecting it unless noDeselect is specified
if (oldPlane == newPlane && (options.noDeselect || showTrace)) {
@@ -4412,8 +4418,7 @@ function toggleMilitary() {
refreshFilter();
active();
- if (onlyMilitary)
- fetchData({force: true});
+ fetchData({force: true});
}
function togglePersistence() {
@@ -7134,8 +7139,8 @@ function replayStep(arg) {
replay.addressMinutes = replay.minutes;
updateAddressBar();
}
+ //console.log(replay.ts.toUTCString());
if (now - lastReap > 60) {
- //console.log(replay.ts.toUTCString());
reaper();
}
}
@@ -7464,9 +7469,7 @@ function showReplayBar(){
function timeoutFetch() {
fetchData();
timers.checkMove = setTimeout(timeoutFetch, Math.max(RefreshInterval, 10000));
- if (now - lastReap > 60) {
- reaper();
- }
+ reaper();
}
function handleVisibilityChange() {