From 6c904bf1894edd525b0067309003485b1cad88b4 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 5 Apr 2021 14:48:05 -0400 Subject: [PATCH] 2021-04-05 Fred Gleason * Added the value of the detected CartChunk CutID to the error message generated when rejecting said CutID as invalid when using the '--use-cartchunk-cutid' switch in rdimport(1). * Added code to print the value of the detected CartChunk CutID when using both the '--use-cartchunk-cutid' and '--verbose' flags in rdimport(1). Signed-off-by: Fred Gleason --- ChangeLog | 7 +++++++ utils/rdimport/rdimport.cpp | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d601ae6..ded6db1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20705,3 +20705,10 @@ 2021-04-05 David Klann * Fixed bug in lib/rdwavefile.cpp that copied CartChunk Cut ID past the end of the first "NULL" character. +2021-04-05 Fred Gleason + * Added the value of the detected CartChunk CutID to the error + message generated when rejecting said CutID as invalid when using + the '--use-cartchunk-cutid' switch in rdimport(1). + * Added code to print the value of the detected CartChunk CutID + when using both the '--use-cartchunk-cutid' and '--verbose' flags + in rdimport(1). diff --git a/utils/rdimport/rdimport.cpp b/utils/rdimport/rdimport.cpp index c9d4f446..b51fe0e2 100644 --- a/utils/rdimport/rdimport.cpp +++ b/utils/rdimport/rdimport.cpp @@ -1060,15 +1060,15 @@ MainObject::Result MainObject::ImportFile(const QString &filename, // if(import_use_cartchunk_cutid||found_cart) { *cartnum=0; + Log(LOG_INFO," found CartChunk CutID \""+wavedata->cutId()+"\"\n"); *cartnum=wavedata->cutId().toUInt(&ok); - //sscanf(wavedata->cutId(),"%u",cartnum); (*cartnum)+=import_cart_number_offset; if((!ok)||(*cartnum==0)||(*cartnum>999999)|| (effective_group->enforceCartRange()&& (!effective_group->cartNumberValid(*cartnum)))) { - Log(LOG_WARNING,QString().sprintf( - " File \"%s\" has an invalid or out of range Cart Number, skipping...\n", - RDGetBasePart(filename).toUtf8().constData())); + Log(LOG_WARNING,QString().sprintf(" File \"%s\" has an invalid or out of range Cart Number \"%s\", skipping...\n", + RDGetBasePart(filename).toUtf8().constData(), + wavedata->cutId().toUtf8().constData())); wavefile->closeWave(); import_failed_imports++; import_journal->addFailure(effective_group->name(),filename,