MythTV  master
sourceutil.cpp
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 
3 // MythTV headers
4 #include "libmythbase/mythdb.h"
5 #include "libmythbase/mythdirs.h"
8 
9 #include "cardutil.h"
10 #include "channelscan/scaninfo.h"
11 #include "sourceutil.h"
12 
14 {
16 
17  query.prepare(
18  "SELECT mplexid, atsc_minor_chan, serviceid "
19  "FROM channel "
20  "WHERE deleted IS NULL AND "
21  " sourceid = :SOURCEID");
22  query.bindValue(":SOURCEID", sourceid);
23 
24  if (!query.exec())
25  {
26  MythDB::DBError("SourceUtil::HasDigitalChannel()", query);
27  return false;
28  }
29 
30  while (query.next())
31  {
32  uint mplexid = query.value(0).toUInt();
33  uint minor = query.value(1).toUInt();
34  uint prognum = query.value(2).toUInt();
35  mplexid = (32767 == mplexid) ? 0 : mplexid;
36 
37  if (mplexid && (minor || prognum))
38  return true;
39  }
40 
41  return false;
42 }
43 
45 {
47 
48  query.prepare(
49  "SELECT name "
50  "FROM videosource "
51  "WHERE sourceid = :SOURCEID");
52  query.bindValue(":SOURCEID", sourceid);
53 
54  if (!query.exec())
55  {
56  MythDB::DBError("SourceUtil::GetSourceName()", query);
57  return {};
58  }
59  if (!query.next())
60  {
61  return {};
62  }
63 
64  return query.value(0).toString();
65 }
66 
67 uint SourceUtil::GetSourceID(const QString &name)
68 {
70 
71  query.prepare(
72  "SELECT sourceid "
73  "FROM videosource "
74  "WHERE name = :NAME");
75  query.bindValue(":NAME", name);
76 
77  if (!query.exec())
78  {
79  MythDB::DBError("SourceUtil::GetSourceID()", query);
80  return 0;
81  }
82  if (!query.next())
83  {
84  return 0;
85  }
86 
87  return query.value(0).toUInt();
88 }
89 
91 {
93  query.prepare("SELECT channum "
94  "FROM channel "
95  "WHERE deleted IS NULL AND "
96  " sourceid = :SOURCEID");
97  query.bindValue(":SOURCEID", sourceid);
98 
99  if (query.exec() && query.isActive() && query.size() > 0)
100  {
101  QMap<QString,uint> counts;
102  static const QRegularExpression kSeparatorRE { R"((_|-|#|\.))" };
103  while (query.next())
104  {
105  const QString channum = query.value(0).toString();
106  const int where = channum.indexOf(kSeparatorRE);
107  if (channum.right(2).startsWith("0"))
108  counts["0"]++;
109  else
110  counts[(where < 0) ? "" : QString(channum.at(where))]++;
111  }
112  QString sep = "_";
113  uint max = counts["_"];
114  static const std::array<const QString,5> s_spacers { "", "-", "#", ".", "0" };
115  for (const auto & spacer : s_spacers)
116  {
117  if (counts[spacer] > max)
118  {
119  max = counts[spacer];
120  sep = spacer;
121  }
122  }
123  return sep;
124  }
125  return "_"; // default on failure
126 }
127 
129 {
130  return QString("%1") + GetChannelSeparator(sourceid) + QString("%2");
131 }
132 
134 {
135  MSqlQuery query(MSqlQuery::InitCon());
136  query.prepare("SELECT sum(1) "
137  "FROM channel "
138  "WHERE deleted IS NULL AND "
139  " sourceid = :SOURCEID");
140  query.bindValue(":SOURCEID", sourceid);
141  if (query.exec() && query.isActive() && query.next())
142  return query.value(0).toUInt();
143  return 0;
144 }
145 
146 std::vector<uint> SourceUtil::GetMplexIDs(uint sourceid)
147 {
148  MSqlQuery query(MSqlQuery::InitCon());
149 
150  query.prepare(
151  "SELECT mplexid "
152  "FROM dtv_multiplex "
153  "WHERE sourceid = :SOURCEID");
154  query.bindValue(":SOURCEID", sourceid);
155 
156  std::vector<uint> list;
157  if (!query.exec())
158  {
159  MythDB::DBError("SourceUtil::GetMplexIDs()", query);
160  return list;
161  }
162 
163  while (query.next())
164  list.push_back(query.value(0).toUInt());
165 
166  return list;
167 }
168 
170  QString &grabber, QString &userid,
171  QString &passwd, QString &lineupid)
172 {
173  MSqlQuery query(MSqlQuery::InitCon());
174  query.prepare(
175  "SELECT xmltvgrabber, userid, password, lineupid "
176  "FROM videosource "
177  "WHERE sourceid = :SOURCEID");
178  query.bindValue(":SOURCEID", sourceid);
179 
180  if (!query.exec() || !query.isActive())
181  {
182  MythDB::DBError("SourceUtil::GetListingsLoginData()", query);
183  return false;
184  }
185 
186  if (!query.next())
187  return false;
188 
189  grabber = query.value(0).toString();
190  userid = query.value(1).toString();
191  passwd = query.value(2).toString();
192  lineupid = query.value(3).toString();
193 
194  return true;
195 }
196 
197 static QStringList get_inputtypes(uint sourceid)
198 {
199  QStringList list;
200 
201  MSqlQuery query(MSqlQuery::InitCon());
202  query.prepare(
203  "SELECT cardtype, inputname "
204  "FROM capturecard "
205  "WHERE capturecard.sourceid = :SOURCEID");
206  query.bindValue(":SOURCEID", sourceid);
207 
208  if (!query.exec() || !query.isActive())
209  MythDB::DBError("get_inputtypes()", query);
210  else
211  {
212  while (query.next())
213  {
215  QString inputtype = query.value(0).toString().toUpper();
216  QString inputname = query.value(1).toString().toUpper();
217  inputtype = ((inputtype == "DVB") && (!inputname.startsWith("DVB"))) ?
218  "V4L" : inputtype;
220  list += inputtype;
221  }
222  }
223 
224  return list;
225 }
226 
228 {
229  QStringList types = get_inputtypes(sourceid);
230  return types.size();
231 }
232 
233 bool SourceUtil::IsProperlyConnected(uint sourceid, bool strict)
234 {
235  QStringList types = get_inputtypes(sourceid);
236  QMap<QString,uint> counts;
237  for (const auto & type : qAsConst(types))
238  {
239  counts[type]++;
240 
241  counts[CardUtil::IsEncoder(type) ? "ENCODER" : "NOT_ENCODER"]++;
242  counts[CardUtil::IsUnscanable(type) ? "NO_SCAN" : "SCAN"]++;
243 
245  counts["ANALOG_TUNING"]++;
247  counts["DIGITAL_TUNING"]++;
249  counts["VIRTUAL_TUNING"]++;
250  }
251 
252  bool tune_mismatch =
253  ((counts["ANALOG_TUNING"] != 0U) && (counts["DIGITAL_TUNING"] != 0U)) ||
254  ((counts["VIRTUAL_TUNING"] != 0U) && (counts["DIGITAL_TUNING"] != 0U));
255  bool enc_mismatch = (counts["ENCODER"] != 0U) && (counts["NOT_ENCODER"] != 0U);
256  bool scan_mismatch = (counts["SCAN"] != 0U) && (counts["NO_SCAN"] != 0U);
257 
258  if (tune_mismatch)
259  {
260  uint a = counts["ANALOG_TUNERS"];
261  uint d = counts["DIGITAL_TUNERS"];
262  uint v = counts["VIRTUAL_TUNERS"];
263  LOG(VB_GENERAL, LOG_NOTICE,
264  QString("SourceUtil::IsProperlyConnected(): ") +
265  QString("Connected to %1 analog, %2 digital and %3 virtual "
266  "tuners\n\t\t\t").arg(a).arg(d).arg(v) +
267  QString("Can not mix digital with other tuning information."));
268  }
269 
270  if (enc_mismatch)
271  {
272  uint a = counts["ENCODER"];
273  uint d = counts["NOT_ENCODER"];
274  LOG(VB_GENERAL, LOG_NOTICE,
275  QString("SourceUtil::IsProperlyConnected(): ") +
276  QString("Source ID %1 ").arg(sourceid) +
277  QString("appears to be connected\n\t\t\tto %1 encoder%2, ")
278  .arg(a).arg((1 == a) ? "":"s") +
279  QString("and %1 non-encoder%2. ")
280  .arg(d).arg((1 == d) ? "":"s") +
281  QString("This is probably a bad idea."));
282  }
283 
284  if (scan_mismatch)
285  {
286  uint a = counts["SCAN"];
287  uint d = counts["NO_SCAN"];
288  LOG(VB_GENERAL, LOG_NOTICE,
289  QString("SourceUtil::IsProperlyConnected(): ") +
290  QString("Source ID %1 ").arg(sourceid) +
291  QString("appears to be connected\n\t\t\t"
292  "to %1 scanable input%2, ")
293  .arg(a).arg((1 == a) ? "":"s") +
294  QString("and %1 non-scanable input%2. ")
295  .arg(d).arg((1 == d) ? "":"s") +
296  QString("This may be a problem."));
297  }
298 
299  if (!strict)
300  return !tune_mismatch;
301 
302  return !tune_mismatch && !enc_mismatch && !scan_mismatch;
303 }
304 
305 bool SourceUtil::IsEncoder(uint sourceid, bool strict)
306 {
307  QStringList types = get_inputtypes(sourceid);
308  auto isencoder = [](const auto & type){ return CardUtil::IsEncoder(type); };
309  bool encoder = std::all_of(types.cbegin(), types.cend(), isencoder);
310 
311  // Source is connected, go by input types for type determination
312  if (!types.empty())
313  return encoder;
314 
315  // Try looking at channels if source is not connected,
316  MSqlQuery query(MSqlQuery::InitCon());
317  query.prepare(
318  "SELECT atsc_minor_chan, serviceid "
319  "FROM channel "
320  "WHERE deleted IS NULL AND "
321  " sourceid = :SOURCEID");
322  query.bindValue(":SOURCEID", sourceid);
323 
324  bool has_any_chan = false;
325  if (!query.exec() || !query.isActive())
326  MythDB::DBError("SourceUtil::IsEncoder", query);
327  else
328  {
329  while (query.next())
330  {
331  encoder &= !query.value(0).toBool() && !query.value(1).toBool();
332  has_any_chan = true;
333  }
334  }
335 
336  return (strict && !has_any_chan) ? false: encoder;
337 }
338 
340 {
341  QStringList types = get_inputtypes(sourceid);
342  if (types.empty())
343  return true;
344  auto unscannable = [](const auto & type) { return CardUtil::IsUnscanable(type); };
345  return std::all_of(types.cbegin(), types.cend(), unscannable);
346 }
347 
349 {
350  std::vector<uint> inputs = CardUtil::GetInputIDs(sourceid);
351  auto ccpresent = [](uint input)
353  CardUtil::GetRawInputType(input) == "HDHOMERUN"; };
354  return std::any_of(inputs.cbegin(), inputs.cend(), ccpresent);
355 }
356 
358 {
359  MSqlQuery query(MSqlQuery::InitCon());
360  query.prepare("SELECT sourceid FROM videosource");
361 
362  if (!query.exec() || !query.isActive())
363  {
364  MythDB::DBError("SourceUtil::IsAnySourceScanable", query);
365  return false;
366  }
367 
368  while (query.next())
369  {
370  if (!IsUnscanable(query.value(0).toUInt()))
371  return true;
372  }
373 
374  return false;
375 }
376 
378 {
379  MSqlQuery query(MSqlQuery::InitCon());
380  query.prepare(
381  "SELECT sourceid FROM videosource WHERE sourceid = :SOURCEID");
382  query.bindValue(":SOURCEID", sourceid);
383 
384  if (!query.exec() || !query.isActive())
385  {
386  MythDB::DBError("SourceUtil::IsSourceIDValid", query);
387  return false;
388  }
389 
390  return query.next();
391 }
392 
393 bool SourceUtil::UpdateChannelsFromListings(uint sourceid, const QString& inputtype, bool wait)
394 {
395  if (wait)
396  {
397  QString cmd = GetAppBinDir() +
398  "mythfilldatabase";
399  QStringList args;
400  args.append("--only-update-channels");
401 
402  if (sourceid)
403  {
404  args.append(QString("--sourceid"));
405  args.append(QString::number(sourceid));
406  }
407  if (!inputtype.isEmpty())
408  {
409  args.append(QString("--cardtype"));
410  args.append(inputtype);
411  }
412 
414  getchan.Run();
415  getchan.Wait();
416  }
417  else
418  {
419  QString cmd = GetAppBinDir() +
420  "mythfilldatabase --only-update-channels";
421  if (sourceid)
422  cmd += QString(" --sourceid %1").arg(sourceid);
423  if (!inputtype.isEmpty())
424  cmd += QString(" --cardtype %1").arg(inputtype);
425  cmd += logPropagateArgs;
426 
427  myth_system(cmd);
428  }
429 
430  return true;
431 }
432 
433 bool SourceUtil::UpdateSource( uint sourceid, const QString& sourcename,
434  const QString& grabber, const QString& userid,
435  const QString& freqtable, const QString& lineupid,
436  const QString& password, bool useeit,
437  const QString& configpath, int nitid,
438  uint bouquetid, uint regionid, uint scanfrequency,
439  uint lcnoffset)
440 {
441  MSqlQuery query(MSqlQuery::InitCon());
442 
443  query.prepare("UPDATE videosource SET name = :NAME, xmltvgrabber = :XMLTVGRABBER, "
444  "userid = :USERID, freqtable = :FREQTABLE, lineupid = :LINEUPID,"
445  "password = :PASSWORD, useeit = :USEEIT, configpath = :CONFIGPATH, "
446  "dvb_nit_id = :NITID, bouquet_id = :BOUQUETID, region_id = :REGIONID, "
447  "scanfrequency = :SCANFREQUENCY, lcnoffset = :LCNOFFSET "
448  "WHERE sourceid = :SOURCEID");
449 
450  query.bindValue(":NAME", sourcename);
451  query.bindValue(":XMLTVGRABBER", grabber);
452  query.bindValue(":USERID", userid);
453  query.bindValue(":FREQTABLE", freqtable);
454  query.bindValue(":LINEUPID", lineupid);
455  query.bindValue(":PASSWORD", password);
456  query.bindValue(":USEEIT", useeit);
457  query.bindValue(":CONFIGPATH", configpath.isEmpty() ? nullptr : configpath);
458  query.bindValue(":NITID", nitid);
459  query.bindValue(":BOUQUETID", bouquetid);
460  query.bindValue(":REGIONID", regionid);
461  query.bindValue(":SOURCEID", sourceid);
462  query.bindValue(":SCANFREQUENCY", scanfrequency);
463  query.bindValue(":LCNOFFSET", lcnoffset);
464 
465  if (!query.exec() || !query.isActive())
466  {
467  MythDB::DBError("Updating Video Source", query);
468  return false;
469  }
470 
471  return true;
472 }
473 
474 int SourceUtil::CreateSource( const QString& sourcename,
475  const QString& grabber, const QString& userid,
476  const QString& freqtable, const QString& lineupid,
477  const QString& password, bool useeit,
478  const QString& configpath, int nitid,
479  uint bouquetid, uint regionid, uint scanfrequency,
480  uint lcnoffset)
481 {
482  MSqlQuery query(MSqlQuery::InitCon());
483 
484  query.prepare("INSERT INTO videosource (name,xmltvgrabber,userid,freqtable,lineupid,"
485  "password,useeit,configpath,dvb_nit_id,bouquet_id,region_id, scanfrequency,"
486  "lcnoffset) "
487  "VALUES (:NAME, :XMLTVGRABBER, :USERID, :FREQTABLE, :LINEUPID, :PASSWORD, "
488  ":USEEIT, :CONFIGPATH, :NITID, :BOUQUETID, :REGIONID, :SCANFREQUENCY, "
489  ":LCNOFFSET)");
490 
491  query.bindValue(":NAME", sourcename);
492  query.bindValue(":XMLTVGRABBER", grabber);
493  query.bindValue(":USERID", userid);
494  query.bindValue(":FREQTABLE", freqtable);
495  query.bindValue(":LINEUPID", lineupid);
496  query.bindValue(":PASSWORD", password);
497  query.bindValue(":USEEIT", useeit);
498  query.bindValue(":CONFIGPATH", configpath.isEmpty() ? nullptr : configpath);
499  query.bindValue(":NITID", nitid);
500  query.bindValue(":BOUQUETID", bouquetid);
501  query.bindValue(":REGIONID", regionid);
502  query.bindValue(":SCANFREQUENCY", scanfrequency);
503  query.bindValue(":LCNOFFSET", lcnoffset);
504 
505  if (!query.exec() || !query.isActive())
506  {
507  MythDB::DBError("Adding Video Source", query);
508  return -1;
509  }
510 
511  query.prepare("SELECT MAX(sourceid) FROM videosource");
512 
513  if (!query.exec())
514  {
515  MythDB::DBError("CreateSource maxsource", query);
516  return -1;
517  }
518 
519  int sourceid = -1; /* must be int not uint because of return type. */
520 
521  if (query.next())
522  sourceid = query.value(0).toInt();
523 
524  return sourceid;
525 }
526 
528 {
529  MSqlQuery query(MSqlQuery::InitCon());
530 
531  // Delete the transports associated with the source
532  query.prepare("DELETE FROM dtv_multiplex "
533  "WHERE sourceid = :SOURCEID");
534  query.bindValue(":SOURCEID", sourceid);
535 
536  if (!query.exec() || !query.isActive())
537  {
538  MythDB::DBError("Deleting transports", query);
539  return false;
540  }
541 
542  // Delete the channels associated with the source
543  query.prepare("UPDATE channel "
544  "SET deleted = NOW(), mplexid = 0, sourceid = 0 "
545  "WHERE deleted IS NULL AND sourceid = :SOURCEID");
546  query.bindValue(":SOURCEID", sourceid);
547 
548  if (!query.exec() || !query.isActive())
549  {
550  MythDB::DBError("Deleting Channels", query);
551  return false;
552  }
553 
554  // Detach the inputs associated with the source
555  query.prepare("UPDATE capturecard "
556  "SET sourceid = 0 "
557  "WHERE sourceid = :SOURCEID");
558  query.bindValue(":SOURCEID", sourceid);
559 
560  if (!query.exec() || !query.isActive())
561  {
562  MythDB::DBError("Disassociate source inputs", query);
563  return false;
564  }
565 
566  // Delete all the saved channel scans for this source
568 
569  // Delete the source itself
570  query.prepare("DELETE FROM videosource "
571  "WHERE sourceid = :SOURCEID");
572  query.bindValue(":SOURCEID", sourceid);
573 
574  if (!query.exec() || !query.isActive())
575  {
576  MythDB::DBError("Deleting VideoSource", query);
577  return false;
578  }
579 
580  return true;
581 }
582 
584 {
585  MSqlQuery query(MSqlQuery::InitCon());
586 
587  // Detach all inputs from any source
588  query.prepare("UPDATE capturecard "
589  "SET sourceid = 0");
590  if (!query.exec() || !query.isActive())
591  {
592  MythDB::DBError("Deleting sources", query);
593  return false;
594  }
595 
596  // Delete all channels
597  query.prepare("UPDATE channel "
598  "SET deleted = NOW(), mplexid = 0, sourceid = 0 "
599  "WHERE deleted IS NULL");
600 
601  if (!query.exec() || !query.isActive())
602  {
603  MythDB::DBError("Deleting all Channels", query);
604  return false;
605  }
606 
607  return (query.exec("TRUNCATE TABLE program") &&
608  query.exec("TRUNCATE TABLE videosource") &&
609  query.exec("TRUNCATE TABLE credits") &&
610  query.exec("TRUNCATE TABLE programrating") &&
611  query.exec("TRUNCATE TABLE programgenres") &&
612  query.exec("TRUNCATE TABLE dtv_multiplex") &&
613  query.exec("TRUNCATE TABLE diseqc_config") &&
614  query.exec("TRUNCATE TABLE diseqc_tree") &&
615  query.exec("TRUNCATE TABLE eit_cache") &&
616  query.exec("TRUNCATE TABLE channelgroup") &&
617  query.exec("TRUNCATE TABLE channelgroupnames"));
618 }
MSqlQuery::isActive
bool isActive(void) const
Definition: mythdbcon.h:216
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:807
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:128
build_compdb.args
args
Definition: build_compdb.py:11
CardUtil::GetInputIDs
static std::vector< uint > GetInputIDs(const QString &videodevice=QString(), const QString &rawtype=QString(), const QString &inputname=QString(), QString hostname=QString())
Returns all inputids of inputs that uses the specified videodevice if specified, and optionally rawty...
Definition: cardutil.cpp:1266
CardUtil::IsTuningVirtual
static bool IsTuningVirtual(const QString &rawtype)
Definition: cardutil.h:200
MSqlQuery::size
int size(void) const
Definition: mythdbcon.h:215
SourceUtil::DeleteSource
static bool DeleteSource(uint sourceid)
Definition: sourceutil.cpp:527
mythdb.h
MythSystemLegacy
Definition: mythsystemlegacy.h:67
SourceUtil::GetSourceName
static QString GetSourceName(uint sourceid)
Definition: sourceutil.cpp:44
SourceUtil::IsCableCardPresent
static bool IsCableCardPresent(uint sourceid)
Definition: sourceutil.cpp:348
SourceUtil::GetChannelCount
static uint GetChannelCount(uint sourceid)
Definition: sourceutil.cpp:133
SourceUtil::IsProperlyConnected
static bool IsProperlyConnected(uint sourceid, bool strict=false)
Definition: sourceutil.cpp:233
SourceUtil::GetMplexIDs
static std::vector< uint > GetMplexIDs(uint sourceid)
Definition: sourceutil.cpp:146
SourceUtil::UpdateSource
static bool UpdateSource(uint sourceid, const QString &sourcename, const QString &grabber, const QString &userid, const QString &freqtable, const QString &lineupid, const QString &password, bool useeit, const QString &configpath, int nitid, uint bouquetid, uint regionid, uint scanfrequency, uint lcnoffset)
Definition: sourceutil.cpp:433
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:205
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:608
SourceUtil::GetChannelSeparator
static QString GetChannelSeparator(uint sourceid)
Definition: sourceutil.cpp:90
types
static const struct wl_interface * types[]
Definition: idle_inhibit_unstable_v1.c:39
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
SourceUtil::CreateSource
static int CreateSource(const QString &sourcename, const QString &grabber, const QString &userid, const QString &freqtable, const QString &lineupid, const QString &password, bool useeit, const QString &configpath, int nitid, uint bouquetid, uint regionid, uint scanfrequency, uint lcnoffset)
Definition: sourceutil.cpp:474
mythdirs.h
SourceUtil::GetChannelFormat
static QString GetChannelFormat(uint sourceid)
Definition: sourceutil.cpp:128
myth_system
uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
Definition: mythsystemlegacy.cpp:506
mythsystemlegacy.h
SourceUtil::IsAnySourceScanable
static bool IsAnySourceScanable(void)
Definition: sourceutil.cpp:357
SourceUtil::IsSourceIDValid
static bool IsSourceIDValid(uint sourceid)
Definition: sourceutil.cpp:377
sourceutil.h
SourceUtil::UpdateChannelsFromListings
static bool UpdateChannelsFromListings(uint sourceid, const QString &inputtype=QString(), bool wait=false)
Definition: sourceutil.cpp:393
CardUtil::IsTuningDigital
static bool IsTuningDigital(const QString &rawtype)
Definition: cardutil.h:185
minor
#define minor(X)
Definition: compat.h:76
mythlogging.h
CardUtil::IsEncoder
static bool IsEncoder(const QString &rawtype)
Definition: cardutil.h:130
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:540
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:227
MythSystemLegacy::Wait
uint Wait(std::chrono::seconds timeout=0s)
Definition: mythsystemlegacy.cpp:243
scaninfo.h
SourceUtil::IsUnscanable
static bool IsUnscanable(uint sourceid)
Definition: sourceutil.cpp:339
uint
unsigned int uint
Definition: compat.h:79
SourceUtil::HasDigitalChannel
static bool HasDigitalChannel(uint sourceid)
Definition: sourceutil.cpp:13
ScanInfo::DeleteScansFromSource
static void DeleteScansFromSource(uint sourceid)
Definition: scaninfo.cpp:257
kMSRunShell
@ kMSRunShell
run process through shell
Definition: mythsystem.h:43
kMSAutoCleanup
@ kMSAutoCleanup
automatically delete if backgrounded
Definition: mythsystem.h:45
CardUtil::GetRawInputType
static QString GetRawInputType(uint inputid)
Definition: cardutil.h:287
CardUtil::IsCableCardPresent
static bool IsCableCardPresent(uint inputid, const QString &inputType)
Definition: cardutil.cpp:105
cardutil.h
MSqlQuery::bindValue
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:883
GetAppBinDir
QString GetAppBinDir(void)
Definition: mythdirs.cpp:221
SourceUtil::DeleteAllSources
static bool DeleteAllSources(void)
Definition: sourceutil.cpp:583
SourceUtil::IsEncoder
static bool IsEncoder(uint sourceid, bool strict=false)
Definition: sourceutil.cpp:305
SourceUtil::GetListingsLoginData
static bool GetListingsLoginData(uint sourceid, QString &grabber, QString &userid, QString &passwd, QString &lineupid)
Definition: sourceutil.cpp:169
logPropagateArgs
QString logPropagateArgs
Definition: logging.cpp:86
MythSystemLegacy::Run
void Run(std::chrono::seconds timeout=0s)
Runs a command inside the /bin/sh shell. Returns immediately.
Definition: mythsystemlegacy.cpp:213
d
static const iso6937table * d
Definition: iso6937tables.cpp:1025
SourceUtil::GetConnectionCount
static uint GetConnectionCount(uint sourceid)
Definition: sourceutil.cpp:227
get_inputtypes
static QStringList get_inputtypes(uint sourceid)
Definition: sourceutil.cpp:197
CardUtil::IsTuningAnalog
static bool IsTuningAnalog(const QString &rawtype)
Definition: cardutil.h:193
CardUtil::IsUnscanable
static bool IsUnscanable(const QString &rawtype)
Definition: cardutil.h:153
SourceUtil::GetSourceID
static uint GetSourceID(const QString &name)
Definition: sourceutil.cpp:67
MSqlQuery::prepare
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:832