diff --git a/mythtv/libs/libmythbase/mythcommandlineparser.cpp b/mythtv/libs/libmythbase/mythcommandlineparser.cpp
index 04ab38b..b5cb1d8 100644
|
a
|
b
|
void MythCommandLineParser::addRecording(void)
|
| 2345 | 2345 | ->SetRequires("starttime"); |
| 2346 | 2346 | |
| 2347 | 2347 | add("--starttime", "starttime", QDateTime(), |
| 2348 | | "Specify start time of recording to operate on.", ""); |
| | 2348 | "Specify start time of recording to operate on.", "") |
| | 2349 | ->SetRequires("chanid"); |
| 2349 | 2350 | } |
| 2350 | 2351 | |
| 2351 | 2352 | /** \brief Canned argument definition for --geometry |
diff --git a/mythtv/programs/mythutil/commandlineparser.cpp b/mythtv/programs/mythutil/commandlineparser.cpp
index 141235d..3a6297a 100644
|
a
|
b
|
MythUtilCommandLineParser::MythUtilCommandLineParser() :
|
| 10 | 10 | |
| 11 | 11 | void MythUtilCommandLineParser::LoadArguments(void) |
| 12 | 12 | { |
| | 13 | QStringList ChanidStartimeVideo; |
| | 14 | ChanidStartimeVideo << "chanid" << "starttime" << "video"; |
| 13 | 15 | CommandLineArg::AllowOneOf( QList<CommandLineArg*>() |
| 14 | 16 | // fileutils.cpp |
| 15 | 17 | << add("--copyfile", "copyfile", false, |
| … |
… |
void MythUtilCommandLineParser::LoadArguments(void)
|
| 40 | 42 | << add("--gencutlist", "gencutlist", false, |
| 41 | 43 | "Copy the commercial skip list to the cutlist.", "") |
| 42 | 44 | ->SetGroup("Recording Markup") |
| 43 | | ->SetRequiredChild(QStringList("chanid") << "starttime") |
| | 45 | ->SetParentOf(ChanidStartimeVideo) |
| 44 | 46 | << add("--getcutlist", "getcutlist", false, |
| 45 | 47 | "Display the current cutlist.", "") |
| 46 | 48 | ->SetGroup("Recording Markup") |
| 47 | | ->SetRequiredChild(QStringList("chanid") << "starttime") |
| | 49 | ->SetParentOf(ChanidStartimeVideo) |
| 48 | 50 | << add("--setcutlist", "setcutlist", "", |
| 49 | 51 | "Set a new cutlist in the form:\n" |
| 50 | 52 | "#-#[,#-#]... (ie, 1-100,1520-3012,4091-5094)", "") |
| 51 | 53 | ->SetGroup("Recording Markup") |
| 52 | | ->SetRequiredChild(QStringList("chanid") << "starttime") |
| | 54 | ->SetParentOf(ChanidStartimeVideo) |
| 53 | 55 | << add("--clearcutlist", "clearcutlist", false, |
| 54 | 56 | "Clear the cutlist.", "") |
| 55 | 57 | ->SetGroup("Recording Markup") |
| 56 | | ->SetRequiredChild(QStringList("chanid") << "starttime") |
| | 58 | ->SetParentOf(ChanidStartimeVideo) |
| 57 | 59 | << add("--getskiplist", "getskiplist", false, |
| 58 | 60 | "Display the current commercial skip list.", "") |
| 59 | 61 | ->SetGroup("Recording Markup") |
| 60 | | ->SetRequiredChild(QStringList("chanid") << "starttime") |
| | 62 | ->SetParentOf(ChanidStartimeVideo) |
| 61 | 63 | << add("--setskiplist", "setskiplist", "", |
| 62 | 64 | "Set a new commercial skip list in the form:\n" |
| 63 | 65 | "#-#[,#-#]... (ie, 1-100,1520-3012,4091-5094)", "") |
| 64 | 66 | ->SetGroup("Recording Markup") |
| 65 | | ->SetRequiredChild(QStringList("chanid") << "starttime") |
| | 67 | ->SetParentOf(ChanidStartimeVideo) |
| 66 | 68 | << add("--clearskiplist", "clearskiplist", false, |
| 67 | 69 | "Clear the commercial skip list.", "") |
| 68 | 70 | ->SetGroup("Recording Markup") |
| 69 | | ->SetRequiredChild(QStringList("chanid") << "starttime") |
| | 71 | ->SetParentOf(ChanidStartimeVideo) |
| 70 | 72 | << add("--clearseektable", "clearseektable", false, |
| 71 | 73 | "Clear the seek table.", "") |
| 72 | 74 | ->SetGroup("Recording Markup") |
| 73 | | ->SetRequiredChild(QStringList("chanid") << "starttime") |
| | 75 | ->SetParentOf(ChanidStartimeVideo) |
| 74 | 76 | |
| 75 | 77 | // backendutils.cpp |
| 76 | 78 | << add("--resched", "resched", false, |
| … |
… |
void MythUtilCommandLineParser::LoadArguments(void)
|
| 191 | 193 | addVersion(); |
| 192 | 194 | addLogging(); |
| 193 | 195 | allowExtras(); |
| | 196 | // Note: This globally prevents --chanid and --video from being |
| | 197 | // used together, but this is almost certainly a valid restriction |
| | 198 | // in all cases. |
| | 199 | CommandLineArg::AllowOneOf(QList<CommandLineArg*>() << |
| | 200 | new CommandLineArg("chanid") << |
| | 201 | add("--video", "video", "", |
| | 202 | "Specify path name of Video Gallery video " |
| | 203 | "to operate on.", "")); |
| 194 | 204 | } |
| 195 | 205 | |
| 196 | 206 | QString MythUtilCommandLineParser::GetHelpHeader(void) const |
diff --git a/mythtv/programs/mythutil/mythutil.cpp b/mythtv/programs/mythutil/mythutil.cpp
index 9e88e51..373656a 100644
|
a
|
b
|
|
| 11 | 11 | bool GetProgramInfo(const MythUtilCommandLineParser &cmdline, |
| 12 | 12 | ProgramInfo &pginfo) |
| 13 | 13 | { |
| | 14 | if (cmdline.toBool("video")) |
| | 15 | { |
| | 16 | QString video = cmdline.toString("video"); |
| | 17 | pginfo = ProgramInfo(video); |
| | 18 | return true; |
| | 19 | } |
| 14 | 20 | if (!cmdline.toBool("chanid")) |
| 15 | 21 | { |
| 16 | 22 | LOG(VB_GENERAL, LOG_ERR, "No chanid specified"); |