feat(cloudlog): send a selection from the right-click menu
The one configured service the upload menu did not offer. Not because it uploads one record at a time — QRZ, HAMLOG.online and HamQTH all do — but because Cloudlog keeps no per-QSO sent status, on purpose: it dedupes server-side, so re-sending is harmless and nothing has to be remembered. The menu had been built around that status. An explicit selection needs none of it. The operator picked the rows, and the server refuses what it already has — which is exactly why the missing column stops mattering the moment a human is choosing.
This commit is contained in:
@@ -11731,7 +11731,11 @@ func (a *App) UploadQSOsManual(service string, ids []int64) error {
|
||||
return fmt.Errorf("db not initialized")
|
||||
}
|
||||
svc := extsvc.Service(service)
|
||||
if uploadColumnFor(service) == "" && svc != extsvc.ServiceHamlog && svc != extsvc.ServiceHamQTH {
|
||||
// Cloudlog/Wavelog has no sent-status column ON PURPOSE — it dedupes
|
||||
// server-side, which is exactly why an explicit selection needs no column to
|
||||
// be safe. HAMLOG.online and HamQTH keep theirs in ADIF extras.
|
||||
if uploadColumnFor(service) == "" &&
|
||||
svc != extsvc.ServiceHamlog && svc != extsvc.ServiceHamQTH && svc != extsvc.ServiceCloudlog {
|
||||
return fmt.Errorf("unknown service %q", service)
|
||||
}
|
||||
cfg := a.loadExternalServices()
|
||||
@@ -11955,7 +11959,7 @@ func (a *App) runManualUpload(svc extsvc.Service, ids []int64, cfg extsvc.Extern
|
||||
}
|
||||
flush()
|
||||
}
|
||||
} else if svc == extsvc.ServiceHamlog || svc == extsvc.ServiceHamQTH {
|
||||
} else if svc == extsvc.ServiceHamlog || svc == extsvc.ServiceHamQTH || svc == extsvc.ServiceCloudlog {
|
||||
// One record per request, extras-stamped services. Hamlog used to fall
|
||||
// through to the QRZ branch below and got uploaded to the WRONG service
|
||||
// with the QRZ key — the context menu offered what the loop never handled.
|
||||
@@ -11975,10 +11979,13 @@ func (a *App) runManualUpload(svc extsvc.Service, ids []int64, cfg extsvc.Extern
|
||||
}
|
||||
var res extsvc.UploadResult
|
||||
var err error
|
||||
if svc == extsvc.ServiceHamlog {
|
||||
switch svc {
|
||||
case extsvc.ServiceHamlog:
|
||||
res, err = extsvc.UploadHamlog(ctx, nil, cfg.Hamlog, rec)
|
||||
} else {
|
||||
case extsvc.ServiceHamQTH:
|
||||
res, err = extsvc.UploadHamQTH(ctx, nil, cfg.HamQTH, rec)
|
||||
default:
|
||||
res, err = extsvc.UploadCloudlog(ctx, nil, cfg.Cloudlog, rec)
|
||||
}
|
||||
if err == nil && res.OK {
|
||||
a.markExtUploaded(svc, id, res.LogID)
|
||||
@@ -12034,6 +12041,7 @@ func (a *App) runManualUpload(svc extsvc.Service, ids []int64, cfg extsvc.Extern
|
||||
extsvc.ServiceQRZ: "QRZ.com", extsvc.ServiceClublog: "Club Log", extsvc.ServiceHRDLog: "HRDLog",
|
||||
extsvc.ServiceLoTW: "LoTW", extsvc.ServiceEQSL: "eQSL",
|
||||
extsvc.ServiceHamlog: "HAMLOG.online", extsvc.ServiceHamQTH: "HamQTH",
|
||||
extsvc.ServiceCloudlog: "Cloudlog / Wavelog",
|
||||
}[svc]
|
||||
if label == "" {
|
||||
label = string(svc)
|
||||
|
||||
Reference in New Issue
Block a user