Merge pull request #330 from deltecent/rdimport

Man you're fast!

Merged into 'master'. Thank you!
This commit is contained in:
Fred Gleason 2018-11-30 20:47:42 -05:00 committed by GitHub
commit d2fc3f9b80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -18091,3 +18091,6 @@
2018-11-30 Patrick Linstruth <patrick@deltecent.com>
* Added text clarifying independent rdpanel(1) panels in Ops Guide
and other minor corrections.
2018-11-30 Patrick Linstruth <patrick@deltecent.com>
* Fixed regression with rdimport(1) that threw SQL errors when
importing into an existing cart.

View File

@ -1099,8 +1099,13 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
if(import_delete_cuts) {
DeleteCuts(import_cart_number);
}
cart_created=
RDCart::create(effective_group->name(),RDCart::Audio,&err_msg,*cartnum)!=0;
if (RDCart::exists(*cartnum)) {
cart_created=false;
}
else {
cart_created=
RDCart::create(effective_group->name(),RDCart::Audio,&err_msg,*cartnum)!=0;
}
RDCart *cart=new RDCart(*cartnum);
int cutnum=
cart->addCut(import_format,import_bitrate,import_channels);