fix: say in the log why a recording was not saved

Two silent returns in the save path: no take was running at log time, or the
mode carries no audio worth keeping. Both simply produced no file.

An operator reporting "the sound is not in the folder" is describing an absence,
which is the same absence in either case — but they are different problems with
different fixes, and neither leaves anything behind to inspect. Now each says
which one happened, and for which callsign.

The success line already existed ("qso-rec: saved <path>"), so between the three
the log now accounts for every logged QSO.
This commit is contained in:
2026-07-30 21:41:25 +02:00
parent c6088bb2de
commit 9d691343cf
+6
View File
@@ -7068,10 +7068,16 @@ func (a *App) saveQSORecording(q *qso.QSO) {
// the snapshot failure below — so release the devices from one place rather
// than remembering to do it at each return.
defer a.stopManualQSORecorder()
// Both of these were SILENT returns. When an operator reports "the recording
// was not saved", the log has to say which of the two happened — no take was
// running, or the mode disqualified it — because they are different problems
// with different fixes and neither leaves a file behind to inspect.
if a.qsoRec == nil || !a.qsoRec.Active() {
applog.Printf("qso-rec: nothing saved for %s — no recording was running at log time", q.Callsign)
return
}
if !recordableMode(q.Mode) {
applog.Printf("qso-rec: nothing saved for %s — mode %q carries no audio worth keeping", q.Callsign, q.Mode)
a.qsoRec.DiscardQSO() // digital mode — drop the buffered audio
return
}