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