mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-06-03 01:22:42 +02:00
2014-11-21 Fred Gleason <fredg@paravelsystems.com>
* Added a '--clear-daypart-times' option to rdimport(1) in 'utils/rdimport/rdimport.cpp' and 'utils/rdimport/rdimport.h'.
This commit is contained in:
parent
55d0a43edf
commit
48f663763a
@ -14651,3 +14651,6 @@
|
||||
2014-11-21 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a '--clear-datetimes' option to rdimport(1) in
|
||||
'utils/rdimport/rdimport.cpp' and 'utils/rdimport/rdimport.h'.
|
||||
2014-11-21 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a '--clear-daypart-times' option to rdimport(1) in
|
||||
'utils/rdimport/rdimport.cpp' and 'utils/rdimport/rdimport.h'.
|
||||
|
@ -37,6 +37,12 @@ Do not set the cut start and end datetimes, even if such are found in
|
||||
the file's import metadata. Mutually exclusive with the \fB--set-datetimes\fP
|
||||
option.
|
||||
|
||||
.TP
|
||||
.B --clear-daypart-times
|
||||
Do not set the cut start and end daypart times, even if such are found in
|
||||
the file's import metadata. Mutually exclusive with the
|
||||
\fB--set-daypart-times\fP option.
|
||||
|
||||
.TP
|
||||
.B --create-enddate-offset=<\fIdays\fP>
|
||||
If the imported file does not reference an end date, create with
|
||||
@ -175,11 +181,13 @@ Default action is not to create segue markers.
|
||||
|
||||
.TP
|
||||
.B --set-datetimes=<\fIstart-datetime\fP>,<\fIend-datetime\fP>
|
||||
Set the cut start and end datetimes, in the format YYYYMMDD-HHMMSS.
|
||||
Set the cut start and end datetimes, in the format YYYYMMDD-HHMMSS. Mutually
|
||||
exclusive with \fB--clear-datetimes\fP.
|
||||
|
||||
.TP
|
||||
.B --set-daypart-times=<\fIstart-time\fP>,<\fIend-time\fP>
|
||||
Set the cut start and end daypart times, in the format HHMMSS.
|
||||
Set the cut start and end daypart times, in the format HHMMSS. Mutually
|
||||
exclusive with \fB--clear-daypart-times\fP.
|
||||
|
||||
.TP
|
||||
.B --set-marker-end-<\fImarker\fP>=<\fIoffset\fP>
|
||||
|
@ -90,6 +90,7 @@ MainObject::MainObject(QObject *parent,const char *name)
|
||||
import_string_bpm=0;
|
||||
import_string_year=0;
|
||||
import_clear_datetimes=false;
|
||||
import_clear_dayparts=false;
|
||||
|
||||
//
|
||||
// Read Command Options
|
||||
@ -254,6 +255,10 @@ MainObject::MainObject(QObject *parent,const char *name)
|
||||
exit(256);
|
||||
}
|
||||
}
|
||||
if(import_cmd->key(i)=="--clear-daypart-times") {
|
||||
import_clear_dayparts=true;
|
||||
import_cmd->setProcessed(i,true);
|
||||
}
|
||||
if(import_cmd->key(i)=="--drop-box") {
|
||||
import_drop_box=true;
|
||||
if(import_persistent_dropbox_id<0) {
|
||||
@ -381,6 +386,10 @@ MainObject::MainObject(QObject *parent,const char *name)
|
||||
fprintf(stderr,"rdimport: --set-datetimes and --clear-datetimes are mutually exclusive\n");
|
||||
exit(255);
|
||||
}
|
||||
if((!import_dayparts[1].isNull())&&import_clear_dayparts) {
|
||||
fprintf(stderr,"rdimport: --set-daypart-times and --clear-daypart-times are mutually exclusive\n");
|
||||
exit(255);
|
||||
}
|
||||
|
||||
import_cut_markers=new MarkerSet();
|
||||
import_cut_markers->loadMarker(import_cmd,"cut");
|
||||
@ -639,6 +648,9 @@ MainObject::MainObject(QObject *parent,const char *name)
|
||||
printf(" End Daypart = %s\n",
|
||||
(const char *)import_dayparts[1].toString("hh:mm:ss"));
|
||||
}
|
||||
if(import_clear_dayparts) {
|
||||
printf(" Clearing daypart times\n");
|
||||
}
|
||||
if((!import_datetimes[0].isNull())||(!import_datetimes[1].isNull())) {
|
||||
printf(" Start DateTime = %s\n",
|
||||
(const char *)import_datetimes[0].toString("MM/dd/yyyy hh:mm:ss"));
|
||||
@ -1267,6 +1279,10 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
cut->setStartDaypart(import_dayparts[0],true);
|
||||
cut->setEndDaypart(import_dayparts[1],true);
|
||||
}
|
||||
if(import_clear_dayparts) {
|
||||
cut->setStartDaypart(QTime(),false);
|
||||
cut->setEndDaypart(QTime(),false);
|
||||
}
|
||||
if((!import_datetimes[0].isNull())||(!import_datetimes[1].isNull())) {
|
||||
cut->setStartDatetime(import_datetimes[0],true);
|
||||
cut->setEndDatetime(import_datetimes[1],true);
|
||||
@ -1280,7 +1296,6 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
cut->setStartPoint(import_cut_markers->startValue());
|
||||
cut->setEndPoint(import_cut_markers->endValue());
|
||||
cut->setLength(cut->endPoint()-cut->startPoint());
|
||||
// cart->updateLength();
|
||||
}
|
||||
int lo=cut->startPoint();
|
||||
int hi=cut->endPoint();
|
||||
|
@ -107,6 +107,7 @@ class MainObject : public QObject
|
||||
QDateTime import_datetimes[2];
|
||||
bool import_clear_datetimes;
|
||||
QTime import_dayparts[2];
|
||||
bool import_clear_dayparts;
|
||||
bool import_fix_broken_formats;
|
||||
int import_persistent_dropbox_id;
|
||||
unsigned import_format;
|
||||
|
Loading…
x
Reference in New Issue
Block a user