MythTV  master
filldata.cpp
Go to the documentation of this file.
1 // POSIX headers
2 #include <unistd.h>
3 
4 // Std C headers
5 #include <cstdlib>
6 #include <ctime>
7 
8 // C++ headers
9 #include <fstream>
10 using namespace std;
11 
12 // Qt headers
13 #include <QTextStream>
14 #include <QDateTime>
15 #include <QFile>
16 #include <QList>
17 #include <QMap>
18 #include <QDir>
19 
20 // MythTV headers
21 #include "mythmiscutil.h"
22 #include "exitcodes.h"
23 #include "mythlogging.h"
24 #include "mythdbcon.h"
25 #include "compat.h"
26 #include "mythdate.h"
27 #include "mythdirs.h"
28 #include "mythdb.h"
29 #include "mythsystemlegacy.h"
30 #include "videosource.h" // for is_grabber..
31 #include "mythcorecontext.h"
32 
33 // filldata headers
34 #include "filldata.h"
35 
36 #define LOC QString("FillData: ")
37 #define LOC_WARN QString("FillData, Warning: ")
38 #define LOC_ERR QString("FillData, Error: ")
39 
40 bool updateLastRunEnd(void)
41 {
42  QDateTime qdtNow = MythDate::current();
43  return gCoreContext->SaveSettingOnHost("mythfilldatabaseLastRunEnd",
44  qdtNow.toString(Qt::ISODate),
45  nullptr);
46 }
47 
49 {
51  QDateTime qdtNow = MythDate::current();
52  return gCoreContext->SaveSettingOnHost("mythfilldatabaseLastRunStart",
53  qdtNow.toString(Qt::ISODate),
54  nullptr);
55 }
56 
57 bool updateLastRunStatus(QString &status)
58 {
59  return gCoreContext->SaveSettingOnHost("mythfilldatabaseLastRunStatus",
60  status,
61  nullptr);
62 }
63 
65 {
66  QDateTime nextSuggestedTime = MythDate::current().addDays(1);
67  return gCoreContext->SaveSettingOnHost("MythFillSuggestedRunTime",
68  nextSuggestedTime.toString(Qt::ISODate),
69  nullptr);
70 }
71 
72 void FillData::SetRefresh(int day, bool set)
73 {
74  if (kRefreshClear == day)
75  {
76  m_refresh_all = set;
77  m_refresh_day.clear();
78  }
79  else if (kRefreshAll == day)
80  {
81  m_refresh_all = set;
82  }
83  else
84  {
85  m_refresh_day[(uint)day] = set;
86  }
87 }
88 
89 // XMLTV stuff
90 bool FillData::GrabDataFromFile(int id, QString &filename)
91 {
92  ChannelInfoList chanlist;
93  QMap<QString, QList<ProgInfo> > proglist;
94 
95  m_xmltv_parser.lateInit();
96  if (!m_xmltv_parser.parseFile(filename, &chanlist, &proglist))
97  return false;
98 
99  m_chan_data.handleChannels(id, &chanlist);
100  if (proglist.count() == 0)
101  {
102  LOG(VB_GENERAL, LOG_INFO, "No programs found in data.");
103  m_endofdata = true;
104  }
105  else
106  {
107  ProgramData::HandlePrograms(id, proglist);
108  }
109  return true;
110 }
111 
112 bool FillData::GrabData(const Source& source, int offset)
113 {
114  QString xmltv_grabber = source.xmltvgrabber;
115 
116  const QString templatename = "/tmp/mythXXXXXX";
117  const QString tempfilename = createTempFile(templatename);
118  if (templatename == tempfilename)
119  {
120  m_fatalErrors.push_back("Failed to create temporary file.");
121  return false;
122  }
123 
124  QString filename = QString(tempfilename);
125 
126  QString configfile;
127 
128  MSqlQuery query1(MSqlQuery::InitCon());
129  query1.prepare("SELECT configpath FROM videosource"
130  " WHERE sourceid = :ID AND configpath IS NOT NULL");
131  query1.bindValue(":ID", source.id);
132  if (!query1.exec())
133  {
134  MythDB::DBError("FillData::grabData", query1);
135  return false;
136  }
137 
138  if (query1.next())
139  configfile = query1.value(0).toString();
140  else
141  configfile = QString("%1/%2.xmltv").arg(GetConfDir())
142  .arg(source.name);
143 
144  LOG(VB_GENERAL, LOG_INFO,
145  QString("XMLTV config file is: %1").arg(configfile));
146 
147  QString command = QString("nice %1 --config-file '%2' --output %3")
148  .arg(xmltv_grabber).arg(configfile).arg(filename);
149 
150 
151  if (source.xmltvgrabber_prefmethod != "allatonce" || m_no_allatonce)
152  {
153  // XMLTV Docs don't recommend grabbing one day at a
154  // time but the current MythTV code is heavily geared
155  // that way so until it is re-written behave as
156  // we always have done.
157  command += QString(" --days 1 --offset %1").arg(offset);
158  }
159 
160  if (!VERBOSE_LEVEL_CHECK(VB_XMLTV, LOG_ANY))
161  command += " --quiet";
162 
163  // Append additional arguments passed to mythfilldatabase
164  // using --graboptions
165  if (!m_graboptions.isEmpty())
166  {
167  command += m_graboptions;
168  LOG(VB_XMLTV, LOG_INFO,
169  QString("Using graboptions: %1").arg(m_graboptions));
170  }
171 
172  QString status = QObject::tr("currently running.");
173 
175  updateLastRunStatus(status);
176 
177  LOG(VB_XMLTV, LOG_INFO, QString("Grabber Command: %1").arg(command));
178 
179  LOG(VB_XMLTV, LOG_INFO,
180  "----------------- Start of XMLTV output -----------------");
181 
182  uint systemcall_status = myth_system(command, kMSRunShell);
183  bool succeeded = (systemcall_status == GENERIC_EXIT_OK);
184 
185  LOG(VB_XMLTV, LOG_INFO,
186  "------------------ End of XMLTV output ------------------");
187 
189 
190  status = QObject::tr("Successful.");
191 
192  if (!succeeded)
193  {
194  if (systemcall_status == GENERIC_EXIT_KILLED)
195  {
196  m_interrupted = true;
197  status = QObject::tr("FAILED: XMLTV grabber ran but was interrupted.");
198  }
199  else
200  {
201  status = QObject::tr("FAILED: XMLTV grabber returned error code %1.")
202  .arg(systemcall_status);
203  LOG(VB_GENERAL, LOG_ERR, LOC +
204  QString("XMLTV grabber returned error code %1")
205  .arg(systemcall_status));
206  }
207  }
208 
209  updateLastRunStatus(status);
210 
211  succeeded &= GrabDataFromFile(source.id, filename);
212 
213  QFile thefile(filename);
214  thefile.remove();
215 
216  return succeeded;
217 }
218 
224 bool FillData::Run(SourceList &sourcelist)
225 {
226  SourceList::iterator it;
227 
228  QString status, querystr;
229  MSqlQuery query(MSqlQuery::InitCon());
230  QDateTime GuideDataBefore, GuideDataAfter;
231  int failures = 0;
232  int externally_handled = 0;
233  int total_sources = sourcelist.size();
234  int source_channels = 0;
235 
236  QString sidStr = QString("Updating source #%1 (%2) with grabber %3");
237 
238  m_need_post_grab_proc = false;
239  int nonewdata = 0;
240 
241  for (it = sourcelist.begin(); it != sourcelist.end(); ++it)
242  {
243  if (!m_fatalErrors.empty())
244  break;
245 
246  QString xmltv_grabber = (*it).xmltvgrabber;
247 
248  if (xmltv_grabber == "datadirect" ||
249  xmltv_grabber == "schedulesdirect1")
250  {
251  LOG(VB_GENERAL, LOG_ERR,
252  QString("Source %1 is configured to use the DataDirect guide"
253  "service from Schedules Direct. That service is no "
254  "longer supported by MythTV. Update to use one of "
255  "the XMLTV grabbers that use the JSON-based guide "
256  "service from Schedules Direct.")
257  .arg((*it).id));
258  continue;
259  }
260 
261  query.prepare("SELECT MAX(endtime) "
262  "FROM program p "
263  "LEFT JOIN channel c ON p.chanid=c.chanid "
264  "WHERE c.deleted IS NULL AND c.sourceid= :SRCID "
265  " AND manualid = 0 AND c.xmltvid != '';");
266  query.bindValue(":SRCID", (*it).id);
267 
268  if (query.exec() && query.next())
269  {
270  if (!query.isNull(0))
271  GuideDataBefore =
272  MythDate::fromString(query.value(0).toString());
273  }
274 
275  m_channel_update_run = false;
276  m_endofdata = false;
277 
278  if (xmltv_grabber == "eitonly")
279  {
280  LOG(VB_GENERAL, LOG_INFO,
281  QString("Source %1 configured to use only the "
282  "broadcasted guide data. Skipping.") .arg((*it).id));
283 
284  externally_handled++;
287  continue;
288  }
289  if (xmltv_grabber.trimmed().isEmpty() ||
290  xmltv_grabber == "/bin/true" ||
291  xmltv_grabber == "none")
292  {
293  LOG(VB_GENERAL, LOG_INFO,
294  QString("Source %1 configured with no grabber. Nothing to do.")
295  .arg((*it).id));
296 
297  externally_handled++;
300  continue;
301  }
302 
303  LOG(VB_GENERAL, LOG_INFO, sidStr.arg((*it).id)
304  .arg((*it).name)
305  .arg(xmltv_grabber));
306 
307  query.prepare(
308  "SELECT COUNT(chanid) FROM channel "
309  "WHERE deleted IS NULL AND "
310  " sourceid = :SRCID AND xmltvid != ''");
311  query.bindValue(":SRCID", (*it).id);
312 
313  if (query.exec() && query.next())
314  {
315  source_channels = query.value(0).toInt();
316  if (source_channels > 0)
317  {
318  LOG(VB_GENERAL, LOG_INFO,
319  QString("Found %1 channels for source %2 which use grabber")
320  .arg(source_channels).arg((*it).id));
321  }
322  else
323  {
324  LOG(VB_GENERAL, LOG_INFO,
325  QString("No channels are configured to use grabber."));
326  }
327  }
328  else
329  {
330  source_channels = 0;
331  LOG(VB_GENERAL, LOG_INFO,
332  QString("Can't get a channel count for source id %1")
333  .arg((*it).id));
334  }
335 
336  bool hasprefmethod = false;
337 
338  if (is_grabber_external(xmltv_grabber))
339  {
340  uint flags = kMSRunShell | kMSStdOut;
341  MythSystemLegacy grabber_capabilities_proc(xmltv_grabber,
342  QStringList("--capabilities"),
343  flags);
344  grabber_capabilities_proc.Run(25);
345  if (grabber_capabilities_proc.Wait() != GENERIC_EXIT_OK)
346  LOG(VB_GENERAL, LOG_ERR,
347  QString("%1 --capabilities failed or we timed out waiting."
348  " You may need to upgrade your xmltv grabber")
349  .arg(xmltv_grabber));
350  else
351  {
352  QByteArray result = grabber_capabilities_proc.ReadAll();
353  QTextStream ostream(result);
354  QString capabilities;
355  while (!ostream.atEnd())
356  {
357  QString capability
358  = ostream.readLine().simplified();
359 
360  if (capability.isEmpty())
361  continue;
362 
363  capabilities += capability + ' ';
364 
365  if (capability == "baseline")
366  (*it).xmltvgrabber_baseline = true;
367 
368  if (capability == "manualconfig")
369  (*it).xmltvgrabber_manualconfig = true;
370 
371  if (capability == "cache")
372  (*it).xmltvgrabber_cache = true;
373 
374  if (capability == "preferredmethod")
375  hasprefmethod = true;
376  }
377  LOG(VB_GENERAL, LOG_INFO,
378  QString("Grabber has capabilities: %1") .arg(capabilities));
379  }
380  }
381 
382  if (hasprefmethod)
383  {
384  uint flags = kMSRunShell | kMSStdOut;
385  MythSystemLegacy grabber_method_proc(xmltv_grabber,
386  QStringList("--preferredmethod"),
387  flags);
388  grabber_method_proc.Run(15);
389  if (grabber_method_proc.Wait() != GENERIC_EXIT_OK)
390  LOG(VB_GENERAL, LOG_ERR,
391  QString("%1 --preferredmethod failed or we timed out "
392  "waiting. You may need to upgrade your xmltv "
393  "grabber").arg(xmltv_grabber));
394  else
395  {
396  QTextStream ostream(grabber_method_proc.ReadAll());
397  (*it).xmltvgrabber_prefmethod =
398  ostream.readLine().simplified();
399 
400  LOG(VB_GENERAL, LOG_INFO, QString("Grabber prefers method: %1")
401  .arg((*it).xmltvgrabber_prefmethod));
402  }
403  }
404 
405  m_need_post_grab_proc |= true;
406 
407  if ((*it).xmltvgrabber_prefmethod == "allatonce" && !m_no_allatonce)
408  {
409  if (!GrabData(*it, 0))
410  ++failures;
411  }
412  else if ((*it).xmltvgrabber_baseline)
413  {
414 
415  QDate qCurrentDate = MythDate::current().date();
416 
417  // We'll keep grabbing until it returns nothing
418  // Max days currently supported is 21
419  int grabdays = REFRESH_MAX;
420 
421  grabdays = (m_maxDays > 0) ? m_maxDays : grabdays;
422  grabdays = (m_only_update_channels) ? 1 : grabdays;
423 
424  vector<bool> refresh_request;
425  refresh_request.resize(grabdays, m_refresh_all);
426  if (!m_refresh_all)
427  // Set up days to grab if all is not specified
428  // If all was specified the vector was initialized
429  // with true in all occurrences.
430  for (int i = 0; i < grabdays; i++)
431  refresh_request[i] = m_refresh_day[i];
432 
433  for (int i = 0; i < grabdays; i++)
434  {
435  if (!m_fatalErrors.empty())
436  break;
437 
438  // We need to check and see if the current date has changed
439  // since we started in this loop. If it has, we need to adjust
440  // the value of 'i' to compensate for this.
441  if (MythDate::current().date() != qCurrentDate)
442  {
443  QDate newDate = MythDate::current().date();
444  i += (newDate.daysTo(qCurrentDate));
445  if (i < 0)
446  i = 0;
447  qCurrentDate = newDate;
448  }
449 
450  QString prevDate(qCurrentDate.addDays(i-1).toString());
451  QString currDate(qCurrentDate.addDays(i).toString());
452 
453  LOG(VB_GENERAL, LOG_INFO, ""); // add a space between days
454  LOG(VB_GENERAL, LOG_INFO, "Checking day @ " +
455  QString("offset %1, date: %2").arg(i).arg(currDate));
456 
457  bool download_needed = false;
458 
459  if (refresh_request[i])
460  {
461  if ( i == 1 )
462  {
463  LOG(VB_GENERAL, LOG_INFO,
464  "Data Refresh always needed for tomorrow");
465  }
466  else
467  {
468  LOG(VB_GENERAL, LOG_INFO,
469  "Data Refresh needed because of user request");
470  }
471  download_needed = true;
472  }
473  else
474  {
475  // Check to see if we already downloaded data for this date.
476 
477  querystr = "SELECT c.chanid, COUNT(p.starttime) "
478  "FROM channel c "
479  "LEFT JOIN program p ON c.chanid = p.chanid "
480  " AND starttime >= "
481  "DATE_ADD(DATE_ADD(CURRENT_DATE(), "
482  "INTERVAL '%1' DAY), INTERVAL '20' HOUR) "
483  " AND starttime < DATE_ADD(CURRENT_DATE(), "
484  "INTERVAL '%2' DAY) "
485  "WHERE c.deleted IS NULL AND c.sourceid = %3 AND c.xmltvid != '' "
486  "GROUP BY c.chanid;";
487 
488  if (query.exec(querystr.arg(i-1).arg(i).arg((*it).id)) &&
489  query.isActive())
490  {
491  int prevChanCount = 0;
492  int currentChanCount = 0;
493  int previousDayCount = 0;
494  int currentDayCount = 0;
495 
496  LOG(VB_CHANNEL, LOG_INFO,
497  QString("Checking program counts for day %1")
498  .arg(i-1));
499 
500  while (query.next())
501  {
502  if (query.value(1).toInt() > 0)
503  prevChanCount++;
504  previousDayCount += query.value(1).toInt();
505 
506  LOG(VB_CHANNEL, LOG_INFO,
507  QString(" chanid %1 -> %2 programs")
508  .arg(query.value(0).toString())
509  .arg(query.value(1).toInt()));
510  }
511 
512  if (query.exec(querystr.arg(i).arg(i+1).arg((*it).id))
513  && query.isActive())
514  {
515  LOG(VB_CHANNEL, LOG_INFO,
516  QString("Checking program counts for day %1")
517  .arg(i));
518  while (query.next())
519  {
520  if (query.value(1).toInt() > 0)
521  currentChanCount++;
522  currentDayCount += query.value(1).toInt();
523 
524  LOG(VB_CHANNEL, LOG_INFO,
525  QString(" chanid %1 -> %2 programs")
526  .arg(query.value(0).toString())
527  .arg(query.value(1).toInt()));
528  }
529  }
530  else
531  {
532  LOG(VB_GENERAL, LOG_INFO,
533  QString("Data Refresh because we are unable to "
534  "query the data for day %1 to "
535  "determine if we have enough").arg(i));
536  download_needed = true;
537  }
538 
539  if (currentChanCount < (prevChanCount * 0.90))
540  {
541  LOG(VB_GENERAL, LOG_INFO,
542  QString("Data refresh needed because only %1 "
543  "out of %2 channels have at least one "
544  "program listed for day @ offset %3 "
545  "from 8PM - midnight. Previous day "
546  "had %4 channels with data in that "
547  "time period.")
548  .arg(currentChanCount).arg(source_channels)
549  .arg(i).arg(prevChanCount));
550  download_needed = true;
551  }
552  else if (currentDayCount == 0)
553  {
554  LOG(VB_GENERAL, LOG_INFO,
555  QString("Data refresh needed because no data "
556  "exists for day @ offset %1 from 8PM - "
557  "midnight.").arg(i));
558  download_needed = true;
559  }
560  else if (previousDayCount == 0)
561  {
562  LOG(VB_GENERAL, LOG_INFO,
563  QString("Data refresh needed because no data "
564  "exists for day @ offset %1 from 8PM - "
565  "midnight. Unable to calculate how "
566  "much we should have for the current "
567  "day so a refresh is being forced.")
568  .arg(i-1));
569  download_needed = true;
570  }
571  else if (currentDayCount < (currentChanCount * 3))
572  {
573  LOG(VB_GENERAL, LOG_INFO,
574  QString("Data Refresh needed because offset "
575  "day %1 has less than 3 programs "
576  "per channel for the 8PM - midnight "
577  "time window for channels that "
578  "normally have data. "
579  "We want at least %2 programs, but "
580  "only found %3")
581  .arg(i).arg(currentChanCount * 3)
582  .arg(currentDayCount));
583  download_needed = true;
584  }
585  else if (currentDayCount < (previousDayCount / 2))
586  {
587  LOG(VB_GENERAL, LOG_INFO,
588  QString("Data Refresh needed because offset "
589  "day %1 has less than half the number "
590  "of programs as the previous day for "
591  "the 8PM - midnight time window. "
592  "We want at least %2 programs, but "
593  "only found %3").arg(i)
594  .arg(previousDayCount / 2)
595  .arg(currentDayCount));
596  download_needed = true;
597  }
598  }
599  else
600  {
601  LOG(VB_GENERAL, LOG_INFO,
602  QString("Data Refresh needed because we are unable "
603  "to query the data for day @ offset %1 to "
604  "determine how much we should have for "
605  "offset day %2.").arg(i-1).arg(i));
606  download_needed = true;
607  }
608  }
609 
610  if (download_needed)
611  {
612  LOG(VB_GENERAL, LOG_NOTICE,
613  QString("Refreshing data for ") + currDate);
614  if (!GrabData(*it, i))
615  {
616  ++failures;
617  if (!m_fatalErrors.empty() || m_interrupted)
618  {
619  break;
620  }
621  }
622 
623  if (m_endofdata)
624  {
625  LOG(VB_GENERAL, LOG_INFO,
626  "Grabber is no longer returning program data, "
627  "finishing");
628  break;
629  }
630  }
631  else
632  {
633  LOG(VB_GENERAL, LOG_NOTICE,
634  QString("Data is already present for ") + currDate +
635  ", skipping");
636  }
637  }
638  if (!m_fatalErrors.empty())
639  break;
640  }
641  else
642  {
643  LOG(VB_GENERAL, LOG_ERR,
644  QString("Grabbing XMLTV data using ") + xmltv_grabber +
645  " is not supported. You may need to upgrade to"
646  " the latest version of XMLTV.");
647  }
648 
649  if (m_interrupted)
650  {
651  break;
652  }
653 
654  query.prepare("SELECT MAX(endtime) FROM program p "
655  "LEFT JOIN channel c ON p.chanid=c.chanid "
656  "WHERE c.deleted IS NULL AND c.sourceid= :SRCID "
657  "AND manualid = 0 AND c.xmltvid != '';");
658  query.bindValue(":SRCID", (*it).id);
659 
660  if (query.exec() && query.next())
661  {
662  if (!query.isNull(0))
663  GuideDataAfter = MythDate::fromString(query.value(0).toString());
664  }
665 
666  if (GuideDataAfter == GuideDataBefore)
667  {
668  nonewdata++;
669  }
670  }
671 
672  if (!m_fatalErrors.empty())
673  {
674  for (int i = 0; i < m_fatalErrors.size(); i++)
675  {
676  LOG(VB_GENERAL, LOG_CRIT, LOC + "Encountered Fatal Error: " +
677  m_fatalErrors[i]);
678  }
679  return false;
680  }
681 
682  if (m_only_update_channels && !m_need_post_grab_proc)
683  return true;
684 
685  if (failures == 0)
686  {
687  if (nonewdata > 0 &&
688  (total_sources != externally_handled))
689  status = QObject::tr(
690  "mythfilldatabase ran, but did not insert "
691  "any new data into the Guide for %1 of %2 sources. "
692  "This can indicate a potential grabber failure.")
693  .arg(nonewdata)
694  .arg(total_sources);
695  else
696  status = QObject::tr("Successful.");
697 
698  updateLastRunStatus(status);
699  }
700 
701  return (failures == 0);
702 }
703 
704 /* vim: set expandtab tabstop=4 shiftwidth=4: */
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:781
vector< Source > SourceList
Definition: filldata.h:40
void Run(time_t timeout=0)
Runs a command inside the /bin/sh shell. Returns immediately.
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:862
bool GrabDataFromFile(int id, QString &filename)
Definition: filldata.cpp:90
#define GENERIC_EXIT_OK
Exited with no error.
Definition: exitcodes.h:10
QString xmltvgrabber_prefmethod
Definition: filldata.h:37
bool Run(SourceList &sourcelist)
Goes through the sourcelist and updates its channels with program info grabbed with the associated gr...
Definition: filldata.cpp:224
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
bool updateLastRunEnd(void)
Definition: filldata.cpp:40
#define GENERIC_EXIT_KILLED
Process killed or stopped.
Definition: exitcodes.h:23
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
static void HandlePrograms(uint sourceid, QMap< QString, QList< ProgInfo > > &proglist)
Called from mythfilldatabase to bulk insert data into the program database.
#define LOC
Definition: filldata.cpp:36
int id
Definition: filldata.h:28
QString GetConfDir(void)
Definition: mythdirs.cpp:224
QVariant value(int i) const
Definition: mythdbcon.h:198
#define REFRESH_MAX
Definition: filldata.h:18
#define VERBOSE_LEVEL_CHECK(_MASK_, _LEVEL_)
Definition: mythlogging.h:24
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
QByteArray & ReadAll()
bool isActive(void) const
Definition: mythdbcon.h:204
unsigned int uint
Definition: compat.h:140
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:534
uint myth_system(const QString &command, uint flags, uint timeout)
uint Wait(time_t timeout=0)
QString name
Definition: filldata.h:29
run process through shell
Definition: mythsystem.h:41
QString createTempFile(QString name_template, bool dir)
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:806
#define LOG(_MASK_, _LEVEL_, _STRING_)
Definition: mythlogging.h:41
QString xmltvgrabber
Definition: filldata.h:30
bool updateLastRunStatus(QString &status)
Definition: filldata.cpp:57
bool GrabData(const Source &source, int offset)
Definition: filldata.cpp:112
Default UTC.
Definition: mythdate.h:14
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:602
bool SaveSettingOnHost(const QString &key, const QString &newValue, const QString &host)
bool updateNextScheduledRun()
Definition: filldata.cpp:64
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:179
bool isNull(int field) const
Definition: mythdbcon.h:208
QDateTime fromString(const QString &dtstr)
Converts kFilename && kISODate formats to QDateTime.
Definition: mythdate.cpp:30
vector< ChannelInfo > ChannelInfoList
Definition: channelinfo.h:121
static bool is_grabber_external(const QString &grabber)
Definition: videosource.h:27
bool updateLastRunStart(void)
Definition: filldata.cpp:48
allow access to stdout
Definition: mythsystem.h:39
void SetRefresh(int day, bool set)
Definition: filldata.cpp:72