mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-11 23:32:38 +02:00
2021-07-29 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdimport(1) that caused the cart title uniqueness check to be applied to the incorrect string when the '--set-string-title=' switch was used. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
e15c96481a
commit
0b401e3f86
@ -20775,3 +20775,7 @@
|
||||
2021-07-20 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rdlogedit(1) that could cause a segfault when
|
||||
attempting to play a non-audio event in the 'Voice Tracker' dialog.
|
||||
2021-07-29 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rdimport(1) that caused the cart title
|
||||
uniqueness check to be applied to the incorrect string when
|
||||
the '--set-string-title=' switch was used.
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Batch Importer for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -1076,16 +1076,21 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
//
|
||||
// Ensure that we have a valid title
|
||||
//
|
||||
bool cart_exists=false;
|
||||
if(*cartnum!=0) {
|
||||
cart_exists=RDCart::exists(*cartnum);
|
||||
if(import_string_title.isEmpty()) {
|
||||
bool cart_exists=false;
|
||||
if(*cartnum!=0) {
|
||||
cart_exists=RDCart::exists(*cartnum);
|
||||
}
|
||||
//
|
||||
// If the cart already exists and no title was found in metadata,
|
||||
// then keep the existing title. Otherwise, generate a default title.
|
||||
//
|
||||
if((!cart_exists)&&wavedata->metadataFound()&&wavedata->title().isEmpty()) {
|
||||
wavedata->setTitle(effective_group->generateTitle(filename));
|
||||
}
|
||||
}
|
||||
//
|
||||
// If the cart already exists and no title was found in metadata,
|
||||
// then keep the existing title. Otherwise, generate a default title.
|
||||
//
|
||||
if((!cart_exists)&&wavedata->metadataFound()&&wavedata->title().isEmpty()) {
|
||||
wavedata->setTitle(effective_group->generateTitle(filename));
|
||||
else { // Use specified title
|
||||
wavedata->setTitle(import_string_title);
|
||||
}
|
||||
|
||||
//
|
||||
@ -1204,13 +1209,11 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
settings->setAutotrimLevel(import_autotrim_level/100);
|
||||
conv->setDestinationSettings(settings);
|
||||
conv->setUseMetadata(false);
|
||||
if(import_string_title.isNull()) {
|
||||
Log(LOG_INFO,QString().
|
||||
sprintf(" Importing file \"%s\" [%s] to cart %06u ... ",
|
||||
RDGetBasePart(filename).toUtf8().constData(),
|
||||
wavedata->title().stripWhiteSpace().toUtf8().constData(),
|
||||
*cartnum));
|
||||
}
|
||||
Log(LOG_INFO,QString().
|
||||
sprintf(" Importing file \"%s\" [%s] to cart %06u ... ",
|
||||
RDGetBasePart(filename).toUtf8().constData(),
|
||||
wavedata->title().stripWhiteSpace().toUtf8().constData(),
|
||||
*cartnum));
|
||||
switch(conv_err=conv->runImport(rda->user()->name(),rda->user()->password(),
|
||||
&audio_conv_err)) {
|
||||
case RDAudioImport::ErrorOk:
|
||||
@ -1340,9 +1343,6 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
if(!import_string_song_id.isNull()) {
|
||||
cart->setSongId(import_string_song_id);
|
||||
}
|
||||
if(!import_string_title.isNull()) {
|
||||
cart->setTitle(import_string_title);
|
||||
}
|
||||
if(!import_set_user_defined.isEmpty()) {
|
||||
cart->setUserDefined(import_set_user_defined);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user