Go to the documentation of this file.
10 #include <QCoreApplication>
13 #include <QProcessEnvironment>
20 #include "libmythbase/mythconfig.h"
25 #include "libmythbase/mythversion.h"
43 int main(
int argc,
char *argv[])
64 QCoreApplication a(argc, argv);
68 QString path = QCoreApplication::applicationDirPath();
70 QString(
"%1/../Resources/lib/%2:/../Resources/lib/%2/site-packages:/../Resources/lib/%2/lib-dynload:%3")
72 .arg(QFileInfo(PYTHON_EXE).fileName())
73 .arg(QProcessEnvironment::systemEnvironment().value(
"PYTHONPATH"))
74 .toUtf8().constData(), 1);
94 LOG(VB_GENERAL, LOG_ERR,
"Failed to init MythContext, exiting.");
102 std::unique_ptr<LookerUpper> lookup {
new LookerUpper};
104 LOG(VB_GENERAL, LOG_INFO,
105 "Testing grabbers and metadata sites for functionality...");
108 LOG(VB_GENERAL, LOG_INFO,
109 "All grabbers tested and working. Continuing...");
120 LOG(VB_GENERAL, LOG_INFO,
121 QString(
"No valid job found for jobid: %1")
126 lookup->HandleSingleRecording(chanid, starttime,
137 lookup->HandleAllRecordingRules();
142 lookup->HandleAllArtwork(
false);
146 lookup->HandleAllArtwork(
true);
152 lookup->HandleAllRecordings(
cmdline.
toBool(
"refresh-rules"));
155 while (lookup->StillWorking())
158 qApp->processEvents();
161 LOG(VB_GENERAL, LOG_NOTICE,
"MythMetadataLookup run complete.");
MythCommFlagCommandLineParser cmdline
Startup context for MythTV.
static bool GetJobInfoFromID(int jobID, int &jobType, uint &chanid, QDateTime &recstartts)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
@ GENERIC_EXIT_OK
Exited with no error.
static void PrintVersion(void)
Print application version information.
uint toUInt(const QString &key) const
Returns stored QVariant as an unsigned integer, falling to default if not provided.
void PrintHelp(void) const
Print command line option help.
static void Init(QObject *parent=nullptr)
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
static void CopyRuleInetrefsToRecordings()
@ GENERIC_EXIT_NOT_OK
Exited with error.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
static void load(const QString &module_name)
Load a QTranslator for the user's preferred language.
int toInt(const QString &key) const
Returns stored QVariant as an integer, falling to default if not provided.
static constexpr const char * MYTH_APPNAME_MYTHMETADATALOOKUP
QDateTime toDateTime(const QString &key) const
Returns stored QVariant as a QDateTime, falling to default if not provided.
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)
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.