kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
Simplified internal qso data loading to not be version dependent
rodzic
2ac1011d75
commit
df54f3ce90
|
@ -15870,50 +15870,46 @@ function mediaCheck()
|
|||
|
||||
// Old log filename, no longer referenced
|
||||
tryToDeleteLog("lotw.adif");
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if (fs.existsSync(g_NWappData + "internal_qso.json"))
|
||||
{
|
||||
var data = JSON.parse(fs.readFileSync(g_NWappData + "internal_qso.json"));
|
||||
|
||||
g_tracker = data.tracker;
|
||||
|
||||
if (typeof data.version != "undefined" && data.version == gtVersion)
|
||||
if (typeof g_tracker.worked.px == "undefined")
|
||||
{
|
||||
g_tracker = data.tracker;
|
||||
|
||||
if (typeof g_tracker.worked.px == "undefined")
|
||||
{
|
||||
g_tracker.worked.px = {};
|
||||
g_tracker.confirmed.px = {};
|
||||
}
|
||||
|
||||
g_QSOhash = data.g_QSOhash;
|
||||
|
||||
for (var i in g_QSOhash)
|
||||
{
|
||||
if (
|
||||
typeof g_QSOhash[i].px == "undefined" ||
|
||||
g_QSOhash[i].px == null
|
||||
)
|
||||
{
|
||||
if (g_QSOhash[i].dxcc != -1)
|
||||
{ g_QSOhash[i].px = getWpx(g_QSOhash[i].DEcall); }
|
||||
else g_QSOhash[i].px = null;
|
||||
}
|
||||
g_QSOcount++;
|
||||
if (g_QSOhash[i].confirmed) g_QSLcount++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//clearLogFilesAndCounts();
|
||||
g_tracker.worked.px = {};
|
||||
g_tracker.confirmed.px = {};
|
||||
}
|
||||
|
||||
g_QSOhash = data.g_QSOhash;
|
||||
|
||||
for (var i in g_QSOhash)
|
||||
{
|
||||
if (
|
||||
typeof g_QSOhash[i].px == "undefined" ||
|
||||
g_QSOhash[i].px == null
|
||||
)
|
||||
{
|
||||
if (g_QSOhash[i].dxcc != -1)
|
||||
{ g_QSOhash[i].px = getWpx(g_QSOhash[i].DEcall); }
|
||||
else g_QSOhash[i].px = null;
|
||||
}
|
||||
g_QSOcount++;
|
||||
if (g_QSOhash[i].confirmed) g_QSLcount++;
|
||||
}
|
||||
|
||||
fs.unlinkSync(g_NWappData + "internal_qso.json");
|
||||
}
|
||||
loadReceptionReports();
|
||||
}
|
||||
catch (e) {}
|
||||
catch (e)
|
||||
{
|
||||
clearLogFilesAndCounts();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue