8#include <QCoreApplication>
12#include <mythconfig.h>
21#include <libmythbase/mythversion.h>
47 add(
"--refresh-all",
"refresh-all",
false,
48 "Refresh ALL configured and installed tree grabbers",
"");
49 add(
"--refresh-rss",
"refresh-rss",
false,
50 "Refresh RSS feeds only",
"");
51 add(
"--refresh-tree",
"refresh-tree",
false,
52 "Refresh trees only",
"");
57int main(
int argc,
char *argv[])
78 QCoreApplication a(argc, argv);
79 QCoreApplication::setApplicationName(
"mythfillnetvision");
90 if (!context.Init(
false))
92 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())
152 LOG(VB_GENERAL, LOG_INFO,
"MythFillNetvision run complete.");
void start(QThread::Priority p=QThread::InheritPriority)
Tell MThread to start running the thread in the near future.
Parent class for defining application command line parsers.
void addVersion(void)
Canned argument definition for –version.
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
void addLogging(const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
Canned argument definition for all logging options, including –verbose, –logpath, –quiet,...
static void PrintVersion(void)
Print application version information.
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
void addHelp(void)
Canned argument definition for –help.
virtual void LoadArguments(void)
void PrintHelp(void) const
Print command line option help.
Startup context for MythTV.
MythFillNVCommandLineParser()
void LoadArguments(void) override
static void load(const QString &module_name)
Load a QTranslator for the user's preferred language.
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
@ GENERIC_EXIT_OK
Exited with no error.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
MythCommFlagCommandLineParser cmdline
int main(int argc, char *argv[])
GrabberDownloadThread * gdt
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
RSSSite::rssList findAllDBRSS()