MythTV  master
mythmetadatalookup_commandlineparser.cpp
Go to the documentation of this file.
1 #include <QList>
2 #include <QString>
3 
5 
7 
11 
13 {
14  addHelp();
15  addVersion();
16  addRecording();
17  addJob();
18  addLogging();
19 
20  CommandLineArg::AllowOneOf( QList<CommandLineArg*>()
21  << add("--refresh-all", "refresh-all", false,
22  "Batch update recorded program metadata. If a recording's "
23  "rule has an inetref but the recording does not, it will "
24  "be inherited.", "")
25  << add("--refresh-all-rules", "refresh-all-rules", false,
26  "Batch update metadata for recording rules. This will "
27  "set inetrefs for your recording rules based on an automated "
28  "lookup. This is a best effort, and not guaranteed! If your "
29  "recordings lack inetrefs but one is found for the rule, it "
30  "will be inherited.", "")
31  << add("--refresh-all-artwork", "refresh-all-artwork", false,
32  "Batch update artwork for non-generic recording rules "
33  "and recordings. This is a more conservative option "
34  "which only operates on items for which it is likely "
35  "to be able to find artwork. This option will not "
36  "overwrite any existing artwork.", "")
37  << add("--refresh-all-artwork-dangerously",
38  "refresh-all-artwork-dangerously", false,
39  "Batch update artwork for ALL recording rules and recordings. "
40  "This will attempt to download fanart, coverart, and banner "
41  "for each season of each recording rule and all recordings. "
42  "This option will not overwrite any existing artwork. If a "
43  "rule or recording has not been looked up, this will attempt "
44  "to look it up. This is a very aggressive option! Use with "
45  "care.", "")
46  << new CommandLineArg("chanid")
47  << new CommandLineArg("jobid") );
48 
49  add("--refresh-rules", "refresh-rules", false,
50  "Also update inetref for recording rules when metadata is "
51  "found for a recording (Best effort only, imperfect)", "")
52  ->SetBlocks("refresh-all")
53  ->SetBlocks("refresh-all-rules")
54  ->SetBlocks("refresh-all-artwork")
55  ->SetBlocks("refresh-all-artwork-dangerously")
56  ->SetChildOf("chanid")
57  ->SetChildOf("jobid");
58 }
59 
CommandLineArg::AllowOneOf
static void AllowOneOf(const QList< CommandLineArg * > &args)
Mark a list of arguments as mutually exclusive.
Definition: mythcommandlineparser.cpp:939
MythCommandLineParser
Parent class for defining application command line parsers.
Definition: mythcommandlineparser.h:116
MythMetadataLookupCommandLineParser::MythMetadataLookupCommandLineParser
MythMetadataLookupCommandLineParser()
Definition: mythmetadatalookup_commandlineparser.cpp:8
MythCommandLineParser::addVersion
void addVersion(void)
Canned argument definition for –version.
Definition: mythcommandlineparser.cpp:2558
MythCommandLineParser::addRecording
void addRecording(void)
Canned argument definition for –chanid and –starttime.
Definition: mythcommandlineparser.cpp:2625
MythCommandLineParser::addLogging
void addLogging(const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
Canned argument definition for all logging options, including –verbose, –logpath, –quiet,...
Definition: mythcommandlineparser.cpp:2662
CommandLineArg::SetChildOf
CommandLineArg * SetChildOf(const QString &opt)
Set argument as child of given parent.
Definition: mythcommandlineparser.cpp:695
MythCommandLineParser::add
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
Definition: mythcommandlineparser.cpp:1776
mythappname.h
CommandLineArg::SetBlocks
CommandLineArg * SetBlocks(const QString &opt)
Set argument as incompatible with given option.
Definition: mythcommandlineparser.cpp:788
MythCommandLineParser::addHelp
void addHelp(void)
Canned argument definition for –help.
Definition: mythcommandlineparser.cpp:2545
CommandLineArg
Definition for a single command line option.
Definition: mythcommandlineparser.h:21
MythMetadataLookupCommandLineParser::LoadArguments
void LoadArguments(void) override
Definition: mythmetadatalookup_commandlineparser.cpp:12
MythCommandLineParser::addJob
void addJob(void)
Canned argument definition for –jobid.
Definition: mythcommandlineparser.cpp:2744
mythmetadatalookup_commandlineparser.h
MYTH_APPNAME_MYTHMETADATALOOKUP
static constexpr const char * MYTH_APPNAME_MYTHMETADATALOOKUP
Definition: mythappname.h:18