Ticket #10804: videomarkup.patch

File videomarkup.patch, 3.9 KB (added by Jim Stichnoth, 11 years ago)
  • mythtv/programs/mythutil/commandlineparser.cpp

    diff --git a/mythtv/programs/mythutil/commandlineparser.cpp b/mythtv/programs/mythutil/commandlineparser.cpp
    index 141235d..d540223 100644
    a b void MythUtilCommandLineParser::LoadArguments(void) 
    4040        << add("--gencutlist", "gencutlist", false,
    4141                "Copy the commercial skip list to the cutlist.", "")
    4242                ->SetGroup("Recording Markup")
    43                 ->SetRequiredChild(QStringList("chanid") << "starttime")
    4443        << add("--getcutlist", "getcutlist", false,
    4544                "Display the current cutlist.", "")
    4645                ->SetGroup("Recording Markup")
    47                 ->SetRequiredChild(QStringList("chanid") << "starttime")
    4846        << add("--setcutlist", "setcutlist", "",
    4947                "Set a new cutlist in the form:\n"
    5048                "#-#[,#-#]... (ie, 1-100,1520-3012,4091-5094)", "")
    5149                ->SetGroup("Recording Markup")
    52                 ->SetRequiredChild(QStringList("chanid") << "starttime")
    5350        << add("--clearcutlist", "clearcutlist", false,
    5451                "Clear the cutlist.", "")
    5552                ->SetGroup("Recording Markup")
    56                 ->SetRequiredChild(QStringList("chanid") << "starttime")
    5753        << add("--getskiplist", "getskiplist", false,
    5854                "Display the current commercial skip list.", "")
    5955                ->SetGroup("Recording Markup")
    60                 ->SetRequiredChild(QStringList("chanid") << "starttime")
    6156        << add("--setskiplist", "setskiplist", "",
    6257                "Set a new commercial skip list in the form:\n"
    6358                "#-#[,#-#]... (ie, 1-100,1520-3012,4091-5094)", "")
    6459                ->SetGroup("Recording Markup")
    65                 ->SetRequiredChild(QStringList("chanid") << "starttime")
    6660        << add("--clearskiplist", "clearskiplist", false,
    6761                "Clear the commercial skip list.", "")
    6862                ->SetGroup("Recording Markup")
    69                 ->SetRequiredChild(QStringList("chanid") << "starttime")
    7063        << add("--clearseektable", "clearseektable", false,
    7164                "Clear the seek table.", "")
    7265                ->SetGroup("Recording Markup")
    73                 ->SetRequiredChild(QStringList("chanid") << "starttime")
    7466
    7567        // backendutils.cpp
    7668        << add("--resched", "resched", false,
    void MythUtilCommandLineParser::LoadArguments(void) 
    117109                "metadata, userjob1, userjob2, userjob3, userjob4) to run "
    118110                "for the recording with the given chanid and starttime.")
    119111                ->SetGroup("JobQueue")
    120                 ->SetRequiredChild("chanid")
    121                 ->SetRequiredChild("starttime")
    122112
    123113        // messageutils.cpp
    124114        << add("--message", "message", false,
    void MythUtilCommandLineParser::LoadArguments(void) 
    191181    addVersion();
    192182    addLogging();
    193183    allowExtras();
     184    CommandLineArg::AllowOneOf(QList<CommandLineArg*>() <<
     185                               new CommandLineArg("chanid") <<
     186                               add("--video", "video", "",
     187                                   "Specify path name of Video Gallery video "
     188                                   "to operate on.", ""));
    194189}
    195190
    196191QString MythUtilCommandLineParser::GetHelpHeader(void) const
  • mythtv/programs/mythutil/mythutil.cpp

    diff --git a/mythtv/programs/mythutil/mythutil.cpp b/mythtv/programs/mythutil/mythutil.cpp
    index 9e88e51..373656a 100644
    a b  
    1111bool GetProgramInfo(const MythUtilCommandLineParser &cmdline,
    1212                    ProgramInfo &pginfo)
    1313{
     14    if (cmdline.toBool("video"))
     15    {
     16        QString video = cmdline.toString("video");
     17        pginfo = ProgramInfo(video);
     18        return true;
     19    }
    1420    if (!cmdline.toBool("chanid"))
    1521    {
    1622        LOG(VB_GENERAL, LOG_ERR, "No chanid specified");