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