Go to the documentation of this file.
8 #include <QCoreApplication>
20 #include <mythconfig.h>
46 add(
"--refresh-all",
"refresh-all",
false,
47 "Refresh ALL configured and installed tree grabbers",
"");
48 add(
"--refresh-rss",
"refresh-rss",
false,
49 "Refresh RSS feeds only",
"");
50 add(
"--refresh-tree",
"refresh-tree",
false,
51 "Refresh trees only",
"");
56 int main(
int argc,
char *argv[])
77 QCoreApplication a(argc, argv);
78 QCoreApplication::setApplicationName(
"mythfillnetvision");
91 LOG(VB_GENERAL, LOG_ERR,
"Failed to init MythContext, exiting.");
100 if (refreshall && (refreshrss || refreshtree))
102 LOG(VB_GENERAL, LOG_ERR,
"--refresh-all must not be accompanied by "
103 "--refresh-rss or --refresh-tree");
107 if (refreshrss && refreshtree)
109 LOG(VB_GENERAL, LOG_ERR,
"--refresh-rss and --refresh-tree are "
110 "mutually exclusive options");
114 if (!refreshall && !refreshrss && !refreshtree)
125 if (refreshall || refreshtree)
138 if ((refreshall || refreshrss) && !
findAllDBRSS().empty())
153 LOG(VB_GENERAL, LOG_INFO,
"MythFillNetvision run complete.");
void LoadArguments(void) override
void start(QThread::Priority p=QThread::InheritPriority)
Tell MThread to start running the thread in the near future.
#define GENERIC_EXIT_OK
Exited with no error.
Parent class for defining application command line parsers.
Startup context for MythTV.
void addVersion(void)
Canned argument definition for –version.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
#define GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
void addLogging(const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
Canned argument definition for all logging options, including –verbose, –logpath, –quiet,...
int main(int argc, char *argv[])
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
MythFillNVCommandLineParser()
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
#define MYTH_BINARY_VERSION
Update this whenever the plug-in ABI changes.
RSSSite::rssList findAllDBRSS()
MythCommFlagCommandLineParser cmdline
GrabberDownloadThread * gdt
void addHelp(void)
Canned argument definition for –help.
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
#define GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
virtual void LoadArguments(void)
static void load(const QString &module_name)
Load a QTranslator for the user's preferred language.
MythContext * gContext
This global variable contains the MythContext instance for the application.
bool Init(bool gui=true, bool promptForBackend=false, bool disableAutoDiscovery=false, bool ignoreDB=false)