mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-25 16:58:04 +02:00
2022-03-22 Fred Gleason <fredg@paravelsystems.com>
* Modified rdimport(1) to allow the '--by-isci' option to take a service name option. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
85faf123ed
commit
4c45d63f5a
@ -20867,3 +20867,6 @@
|
|||||||
* Incremented the package version to 3.6.5.
|
* Incremented the package version to 3.6.5.
|
||||||
2022-03-22 Fred Gleason <fredg@paravelsystems.com>
|
2022-03-22 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Added '--by-isci' and '--dump-isci-xref' options to rdimport(1).
|
* Added '--by-isci' and '--dump-isci-xref' options to rdimport(1).
|
||||||
|
2022-03-22 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Modified rdimport(1) to allow the '--by-isci' option to take
|
||||||
|
a service name option.
|
||||||
|
@ -82,15 +82,19 @@
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<option>--by-isci</option>
|
<option>--by-isci</option>[=<replaceable>service-name</replaceable>]
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Determine the target cart number by looking it up in the ISCI
|
Determine the target cart number by looking it up in the ISCI
|
||||||
cross-reference table, using the ISCI code provided by the
|
cross-reference table, using the ISCI code provided by the
|
||||||
<option>--set-string-isci</option> or
|
<option>--set-string-isci</option> or
|
||||||
<option>--metadata-pattern</option> options. Useful for
|
<option>--metadata-pattern</option> options. If
|
||||||
importing sets of copy-split audio.
|
<replaceable>service-name</replaceable> is given, prepend the
|
||||||
|
Program Code for the specified service followed by an underscore
|
||||||
|
to the ISCI code when doing the cart number lookup in the ISCI
|
||||||
|
cross-reference table. Useful for importing sets of copy-split
|
||||||
|
audio.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
This option is mutually exclusive with the
|
This option is mutually exclusive with the
|
||||||
|
@ -103,6 +103,7 @@ MainObject::MainObject(QObject *parent)
|
|||||||
import_mail_per_file=false;
|
import_mail_per_file=false;
|
||||||
import_journal=NULL;
|
import_journal=NULL;
|
||||||
import_dump_isci_xref=false;
|
import_dump_isci_xref=false;
|
||||||
|
import_by_isci_program_code="";
|
||||||
import_by_isci=false;
|
import_by_isci=false;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -181,6 +182,16 @@ MainObject::MainObject(QObject *parent)
|
|||||||
}
|
}
|
||||||
if(rda->cmdSwitch()->key(i)=="--by-isci") {
|
if(rda->cmdSwitch()->key(i)=="--by-isci") {
|
||||||
import_by_isci=true;
|
import_by_isci=true;
|
||||||
|
if(!rda->cmdSwitch()->value(i).isEmpty()) {
|
||||||
|
RDSvc *svc=new RDSvc(rda->cmdSwitch()->value(i),
|
||||||
|
rda->station(),rda->config(),this);
|
||||||
|
if(!svc->exists()) {
|
||||||
|
Log(LOG_ERR,QString("rdimport: no such service\n"));
|
||||||
|
ErrorExit(RDApplication::ExitNoSvc);
|
||||||
|
}
|
||||||
|
import_by_isci_program_code=svc->programCode();
|
||||||
|
delete svc;
|
||||||
|
}
|
||||||
rda->cmdSwitch()->setProcessed(i,true);
|
rda->cmdSwitch()->setProcessed(i,true);
|
||||||
}
|
}
|
||||||
if(rda->cmdSwitch()->key(i)=="--startdate-offset") {
|
if(rda->cmdSwitch()->key(i)=="--startdate-offset") {
|
||||||
@ -488,6 +499,10 @@ MainObject::MainObject(QObject *parent)
|
|||||||
Log(LOG_ERR,QString().sprintf("rdimport: --log-filename and --log-syslog are mutually exclusive\n"));
|
Log(LOG_ERR,QString().sprintf("rdimport: --log-filename and --log-syslog are mutually exclusive\n"));
|
||||||
ErrorExit(RDApplication::ExitInvalidOption);
|
ErrorExit(RDApplication::ExitInvalidOption);
|
||||||
}
|
}
|
||||||
|
if((import_cart_number>0)&&import_by_isci) {
|
||||||
|
Log(LOG_ERR,QString().sprintf("rdimport: --to-cart and --by-isci are mutually exclusive\n"));
|
||||||
|
ErrorExit(RDApplication::ExitInvalidOption);
|
||||||
|
}
|
||||||
|
|
||||||
import_cut_markers=new MarkerSet();
|
import_cut_markers=new MarkerSet();
|
||||||
import_cut_markers->loadMarker(rda->cmdSwitch(),"cut");
|
import_cut_markers->loadMarker(rda->cmdSwitch(),"cut");
|
||||||
@ -1161,7 +1176,10 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
|||||||
delete effective_group;
|
delete effective_group;
|
||||||
return MainObject::FileBad;
|
return MainObject::FileBad;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!import_by_isci_program_code.isEmpty()) {
|
||||||
|
isci=import_by_isci_program_code+"_"+isci;
|
||||||
|
}
|
||||||
RDWaveData *wd=import_isci_xref.value(isci,NULL);
|
RDWaveData *wd=import_isci_xref.value(isci,NULL);
|
||||||
if(wd==NULL) {
|
if(wd==NULL) {
|
||||||
*cartnum=0;
|
*cartnum=0;
|
||||||
@ -1198,8 +1216,6 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
|||||||
if(import_string_title.isEmpty()) {
|
if(import_string_title.isEmpty()) {
|
||||||
wavedata->setTitle(import_isci_xref.value(isci)->title());
|
wavedata->setTitle(import_isci_xref.value(isci)->title());
|
||||||
}
|
}
|
||||||
printf("ISCI: %s\n",isci.toUtf8().constData());
|
|
||||||
printf("CARTNUM: %06u\n",*cartnum);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//
|
//
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <rdcut.h>
|
#include <rdcut.h>
|
||||||
#include <rdgroup.h>
|
#include <rdgroup.h>
|
||||||
#include <rdnotification.h>
|
#include <rdnotification.h>
|
||||||
|
#include <rdsvc.h>
|
||||||
#include <rdwavedata.h>
|
#include <rdwavedata.h>
|
||||||
#include <rdwavefile.h>
|
#include <rdwavefile.h>
|
||||||
|
|
||||||
@ -123,8 +124,6 @@ class MainObject : public QObject
|
|||||||
int import_segue_length;
|
int import_segue_length;
|
||||||
bool import_send_mail;
|
bool import_send_mail;
|
||||||
bool import_mail_per_file;
|
bool import_mail_per_file;
|
||||||
bool import_dump_isci_xref;
|
|
||||||
bool import_by_isci;
|
|
||||||
unsigned import_cart_number;
|
unsigned import_cart_number;
|
||||||
QString import_metadata_pattern;
|
QString import_metadata_pattern;
|
||||||
QString import_output_pattern;
|
QString import_output_pattern;
|
||||||
@ -164,8 +163,10 @@ class MainObject : public QObject
|
|||||||
MarkerSet *import_fadedown_marker;
|
MarkerSet *import_fadedown_marker;
|
||||||
MarkerSet *import_fadeup_marker;
|
MarkerSet *import_fadeup_marker;
|
||||||
Journal *import_journal;
|
Journal *import_journal;
|
||||||
// QMap<QString,unsigned> import_isci_xref;
|
|
||||||
QMap<QString,RDWaveData *> import_isci_xref;
|
QMap<QString,RDWaveData *> import_isci_xref;
|
||||||
|
bool import_dump_isci_xref;
|
||||||
|
bool import_by_isci;
|
||||||
|
QString import_by_isci_program_code;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user