2021-04-05 Fred Gleason <fredg@paravelsystems.com>

* 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 <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-04-05 14:48:05 -04:00
parent fcacaf4b79
commit 6c904bf189
2 changed files with 11 additions and 4 deletions

View File

@ -20705,3 +20705,10 @@
2021-04-05 David Klann <dklann@broadcasttool.com>
* Fixed bug in lib/rdwavefile.cpp that copied CartChunk Cut ID
past the end of the first "NULL" character.
2021-04-05 Fred Gleason <fredg@paravelsystems.com>
* 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).

View File

@ -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,