mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-25 14:50:11 +01:00
2017-06-19 Fred Gleason <fredg@paravelsystems.com>
* Added a 'SYSTEM.FIX_DUP_CART_TITLES' field to the database. * Incremented the database version to 264. * Added 'RDSystem::fixDuplicateCartTitles()' and 'RDSystem::setFixDuplicateCartTitles()' methods in 'lib/rdsystem.cpp' and 'lib/rdsystem.h'. * Added an 'Auto-Correct Duplicate Cart Titles' checkbox to the 'System Settings' dialog in 'rdadmin/edit_settings.cpp' and 'rdadmin/edit_settings.h'. * Modified the 'EditCart' web call to enforce the 'Auto-Correct Duplicate Cart Titles' setting.
This commit is contained in:
@@ -313,6 +313,11 @@ void Xport::EditCart()
|
||||
cart->setGroupName(group_name);
|
||||
}
|
||||
if(xport_post->getValue("TITLE",&value)) {
|
||||
if((!xport_system->allowDuplicateCartTitles())&&
|
||||
(!xport_system->fixDuplicateCartTitles())&&
|
||||
(!RDCart::titleIsUnique(value))) {
|
||||
XmlExit("Duplicate Cart Title Not Allowed",404,"carts.cpp",LINE_NUMBER);
|
||||
}
|
||||
cart->setTitle(value);
|
||||
}
|
||||
if(xport_post->getValue("ARTIST",&value)) {
|
||||
|
||||
@@ -155,12 +155,20 @@ void Xport::Import()
|
||||
settings->setSampleRate(xport_system->sampleRate());
|
||||
settings->setBitRate(channels*conf->defaultBitrate());
|
||||
settings->setNormalizationLevel(normalization_level);
|
||||
RDWaveData wavedata;
|
||||
RDWaveFile *wave=new RDWaveFile(filename);
|
||||
if(!wave->openWave()) {
|
||||
if(!wave->openWave(&wavedata)) {
|
||||
delete wave;
|
||||
XmlExit("Format Not Supported",415,"import.cpp",LINE_NUMBER);
|
||||
}
|
||||
delete wave;
|
||||
if(use_metadata) {
|
||||
if((!xport_system->allowDuplicateCartTitles())&&
|
||||
(!xport_system->fixDuplicateCartTitles())&&
|
||||
(!RDCart::titleIsUnique(wavedata.title()))) {
|
||||
XmlExit("Duplicate Cart Title Not Allowed",404,"import.cpp",LINE_NUMBER);
|
||||
}
|
||||
}
|
||||
RDAudioConvert *conv=new RDAudioConvert(xport_config->stationName());
|
||||
conv->setSourceFile(filename);
|
||||
conv->setDestinationFile(RDCut::pathName(cartnum,cutnum));
|
||||
|
||||
Reference in New Issue
Block a user