MythTV  master
v2serviceUtil.cpp
Go to the documentation of this file.
1 // Standard UNIX C headers
2 #include <unistd.h>
3 #include <fcntl.h>
4 #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(_WIN32)
5 #include <sys/types.h>
6 #else
7 #include <sys/sysmacros.h>
8 #endif
9 #include <sys/stat.h>
10 
11 // Qt
12 #include <QDir>
13 #include <QFileInfoList>
14 #include <QJsonArray>
15 #include <QJsonObject>
16 
17 // MythTV
18 #include "libmythbase/compat.h"
22 // #include "libmythbase/mythsorthelper.h"
27 #include "libmythtv/cardutil.h"
28 #include "libmythtv/channelgroup.h"
29 #include "libmythtv/channelinfo.h"
30 #include "libmythtv/channelutil.h"
33 #include "libmythtv/tv_rec.h"
34 
35 // MythBackend
36 #include "backendcontext.h"
37 #include "encoderlink.h"
38 #include "scheduler.h"
39 #include "v2encoder.h"
40 #include "v2frontend.h"
41 #include "v2serviceUtil.h"
42 
43 void V2FillProgramInfo( V2Program *pProgram,
44  ProgramInfo *pInfo,
45  bool bIncChannel /* = true */,
46  bool bDetails /* = true */,
47  bool bIncCast /* = true */,
48  bool bIncArtwork /* = true */,
49  bool bIncRecording /* = true */)
50 {
51  if ((pProgram == nullptr) || (pInfo == nullptr))
52  return;
53 
54  pProgram->setStartTime ( pInfo->GetScheduledStartTime());
55  pProgram->setEndTime ( pInfo->GetScheduledEndTime ());
56  pProgram->setTitle ( pInfo->GetTitle() );
57  pProgram->setSubTitle ( pInfo->GetSubtitle() );
58  pProgram->setCategory ( pInfo->GetCategory() );
59  pProgram->setCatType ( pInfo->GetCategoryTypeString());
60  pProgram->setRepeat ( pInfo->IsRepeat() );
61  pProgram->setVideoProps( pInfo->GetVideoProperties() );
62  pProgram->setVideoPropNames( pInfo->GetVideoPropertyNames() );
63  pProgram->setAudioProps( pInfo->GetAudioProperties() );
64  pProgram->setAudioPropNames( pInfo->GetAudioPropertyNames() );
65  pProgram->setSubProps ( pInfo->GetSubtitleType() );
66  pProgram->setSubPropNames( pInfo->GetSubtitleTypeNames() );
67 
68  if (bDetails)
69  {
70  pProgram->setSeriesId ( pInfo->GetSeriesID() );
71  pProgram->setProgramId ( pInfo->GetProgramID() );
72  pProgram->setStars ( pInfo->GetStars() );
73  pProgram->setLastModified( pInfo->GetLastModifiedTime() );
74  pProgram->setProgramFlags( pInfo->GetProgramFlags() );
75  pProgram->setProgramFlagNames( pInfo->GetProgramFlagNames() );
76 
77  // ----
78  // DEPRECATED - See RecordingInfo instead
79  pProgram->setFileName ( pInfo->GetPathname() );
80  pProgram->setFileSize ( pInfo->GetFilesize() );
81  pProgram->setHostName ( pInfo->GetHostname() );
82  // ----
83 
84  if (pInfo->GetOriginalAirDate().isValid())
85  pProgram->setAirdate( pInfo->GetOriginalAirDate() );
86  else if (pInfo->GetYearOfInitialRelease() > 0)
87  {
88  QDate year;
89  year.setDate(pInfo->GetYearOfInitialRelease(), 1, 1);
90  pProgram->setAirdate( year );
91  }
92 
93  pProgram->setDescription( pInfo->GetDescription() );
94  pProgram->setInetref ( pInfo->GetInetRef() );
95  pProgram->setSeason ( pInfo->GetSeason() );
96  pProgram->setEpisode ( pInfo->GetEpisode() );
97  pProgram->setTotalEpisodes( pInfo->GetEpisodeTotal() );
98  }
99 
100  if (bIncCast)
101  V2FillCastMemberList( pProgram->Cast(), pInfo );
102  else
103  pProgram->enableCast(false);
104 
105  if (bIncChannel)
106  {
107  // Build Channel Child Element
108  if (!V2FillChannelInfo( pProgram->Channel(), pInfo->GetChanID(), bDetails ))
109  {
110  // The channel associated with a given recording may no longer exist
111  // however the ChanID is one half of the unique identifier for the
112  // recording and therefore MUST be included in the return data
113  pProgram->Channel()->setChanId(pInfo->GetChanID());
114  }
115  }
116  else
117  {
118  pProgram->enableChannel(false);
119  }
120 
121  // Build Recording Child Element
122 
123  if ( bIncRecording && pInfo->GetRecordingStatus() != RecStatus::Unknown )
124  {
125  V2RecordingInfo *pRecording = pProgram->Recording();
126 
127  const RecordingInfo pRecInfo(*pInfo);
128 
129  pRecording->setRecordedId ( pRecInfo.GetRecordingID() );
130  pRecording->setStatus ( pRecInfo.GetRecordingStatus() );
131  pRecording->setStatusName ( RecStatus::toString( pRecInfo.GetRecordingStatus() ) );
132  pRecording->setRecTypeStatus ( pRecInfo.GetRecTypeStatus(true) );
133  pRecording->setPriority( pRecInfo.GetRecordingPriority() );
134  pRecording->setStartTs ( pRecInfo.GetRecordingStartTime() );
135  pRecording->setEndTs ( pRecInfo.GetRecordingEndTime() );
136 
137  if (bDetails)
138  {
139  pRecording->setFileName ( pRecInfo.GetPathname() );
140  pRecording->setFileSize ( pRecInfo.GetFilesize() );
141  pRecording->setHostName ( pRecInfo.GetHostname() );
142  pRecording->setLastModified( pRecInfo.GetLastModifiedTime() );
143 
144  pRecording->setRecordId ( pRecInfo.GetRecordingRuleID() );
145  pRecording->setRecGroup ( pRecInfo.GetRecordingGroup() );
146  pRecording->setPlayGroup ( pRecInfo.GetPlaybackGroup() );
147  pRecording->setStorageGroup( pRecInfo.GetStorageGroup() );
148  pRecording->setRecType ( pRecInfo.GetRecordingRuleType() );
149  pRecording->setDupInType ( pRecInfo.GetDuplicateCheckSource() );
150  pRecording->setDupMethod ( pRecInfo.GetDuplicateCheckMethod() );
151  pRecording->setEncoderId ( pRecInfo.GetInputID() );
152  pRecording->setEncoderName ( pRecInfo.GetInputName() );
153  pRecording->setProfile ( pRecInfo.GetProgramRecordingProfile() );
154  }
155  }
156  else
157  {
158  pProgram->enableRecording(false);
159  }
160 
161  if ( bIncArtwork && !pInfo->GetInetRef().isEmpty() )
162  V2FillArtworkInfoList( pProgram->Artwork(), pInfo->GetInetRef(), pInfo->GetSeason());
163  else
164  pProgram->enableArtwork(false);
165 }
166 
168 //
170 
172  uint nChanID,
173  bool bDetails /* = true */ )
174 {
175  ChannelInfo channel;
176  if (channel.Load(nChanID))
177  {
178  return V2FillChannelInfo(pChannel, channel, bDetails);
179  }
180 
181  return false;
182 }
183 
185 //
187 
189  const ChannelInfo &channelInfo,
190  bool bDetails /* = true */ )
191 {
192 
193  // TODO update V2ChannelInfo to match functionality of ChannelInfo,
194  // ultimately replacing it's progenitor?
195  pChannel->setChanId(channelInfo.m_chanId);
196  pChannel->setChanNum(channelInfo.m_chanNum);
197  pChannel->setCallSign(channelInfo.m_callSign);
198  if (!channelInfo.m_icon.isEmpty())
199  {
200  QString sIconURL = QString( "/Guide/GetChannelIcon?FileName=%1")
201  .arg( channelInfo.m_icon );
202  pChannel->setIconURL( sIconURL );
203  pChannel->setIcon( channelInfo.m_icon );
204  }
205  pChannel->setChannelName(channelInfo.m_name);
206  pChannel->setVisible(channelInfo.m_visible > kChannelNotVisible);
207  pChannel->setExtendedVisible(toRawString(channelInfo.m_visible));
208 
209  if (bDetails)
210  {
211  pChannel->setMplexId(channelInfo.m_mplexId);
212  pChannel->setServiceId(channelInfo.m_serviceId);
213  pChannel->setATSCMajorChan(channelInfo.m_atscMajorChan);
214  pChannel->setATSCMinorChan(channelInfo.m_atscMinorChan);
215  pChannel->setFormat(channelInfo.m_tvFormat);
216  pChannel->setFineTune(channelInfo.m_fineTune);
217  pChannel->setFrequencyId(channelInfo.m_freqId);
218  pChannel->setChanFilters(channelInfo.m_videoFilters);
219  pChannel->setSourceId(channelInfo.m_sourceId);
220  pChannel->setCommFree(channelInfo.m_commMethod == -2);
221  pChannel->setUseEIT(channelInfo.m_useOnAirGuide);
222  pChannel->setXMLTVID(channelInfo.m_xmltvId);
223  pChannel->setDefaultAuth(channelInfo.m_defaultAuthority);
224  pChannel->setServiceType(channelInfo.m_serviceType);
225  pChannel->setRecPriority(channelInfo.m_recPriority);
226  pChannel->setTimeOffset(channelInfo.m_tmOffset);
227  pChannel->setCommMethod(channelInfo.m_commMethod);
228 
229  QList<uint> groupIds = channelInfo.GetGroupIds();
230  QString sGroupIds;
231  for (int x = 0; x < groupIds.size(); x++)
232  {
233  if (x > 0)
234  sGroupIds += ",";
235 
236  sGroupIds += QString::number(groupIds.at(x));
237  }
238  pChannel->setChannelGroups(sGroupIds);
239 
240  QList<uint> inputIds = channelInfo.GetInputIds();
241  QString sInputIds;
242  for (int x = 0; x < inputIds.size(); x++)
243  {
244  if (x > 0)
245  sInputIds += ",";
246 
247  sInputIds += QString::number(inputIds.at(x));
248  }
249  pChannel->setInputs(sInputIds);
250  }
251 
252  return true;
253 }
254 
255 void V2FillChannelGroup(V2ChannelGroup* pGroup, const ChannelGroupItem& pGroupItem)
256 {
257  if (!pGroup)
258  return;
259 
260  pGroup->setGroupId(pGroupItem.m_grpId);
261  pGroup->setName(pGroupItem.m_name);
262  pGroup->setPassword(""); // Not currently supported
263 }
264 
266 //
268 
269 void V2FillRecRuleInfo( V2RecRule *pRecRule,
270  RecordingRule *pRule )
271 {
272  if ((pRecRule == nullptr) || (pRule == nullptr))
273  return;
274 
275  pRecRule->setId ( pRule->m_recordID );
276  pRecRule->setParentId ( pRule->m_parentRecID );
277  pRecRule->setInactive ( pRule->m_isInactive );
278  pRecRule->setTitle ( pRule->m_title );
279  pRecRule->setSubTitle ( pRule->m_subtitle );
280  pRecRule->setDescription ( pRule->m_description );
281  pRecRule->setSeason ( pRule->m_season );
282  pRecRule->setEpisode ( pRule->m_episode );
283  pRecRule->setCategory ( pRule->m_category );
284 #if QT_VERSION < QT_VERSION_CHECK(6,5,0)
285  pRecRule->setStartTime ( QDateTime(pRule->m_startdate,
286  pRule->m_starttime, Qt::UTC));
287  pRecRule->setEndTime ( QDateTime(pRule->m_enddate,
288  pRule->m_endtime, Qt::UTC));
289 #else
290  static const QTimeZone utc(QTimeZone::UTC);
291  pRecRule->setStartTime ( QDateTime(pRule->m_startdate,
292  pRule->m_starttime, utc));
293  pRecRule->setEndTime ( QDateTime(pRule->m_enddate,
294  pRule->m_endtime, utc));
295 #endif
296  pRecRule->setSeriesId ( pRule->m_seriesid );
297  pRecRule->setProgramId ( pRule->m_programid );
298  pRecRule->setInetref ( pRule->m_inetref );
299  pRecRule->setChanId ( pRule->m_channelid );
300  pRecRule->setCallSign ( pRule->m_station );
301  pRecRule->setFindDay ( pRule->m_findday );
302  pRecRule->setFindTime ( pRule->m_findtime );
303  pRecRule->setType ( toRawString(pRule->m_type) );
304  pRecRule->setSearchType ( toRawString(pRule->m_searchType));
305  pRecRule->setRecPriority ( pRule->m_recPriority );
306  pRecRule->setPreferredInput ( pRule->m_prefInput );
307  pRecRule->setStartOffset ( pRule->m_startOffset );
308  pRecRule->setEndOffset ( pRule->m_endOffset );
309  pRecRule->setDupMethod ( toRawString(pRule->m_dupMethod) );
310  pRecRule->setDupIn ( toRawString(pRule->m_dupIn) );
311  pRecRule->setNewEpisOnly ( newEpifromDupIn(pRule->m_dupIn) );
312  pRecRule->setFilter ( pRule->m_filter );
313  pRecRule->setRecProfile ( pRule->m_recProfile );
314  pRecRule->setRecGroup ( RecordingInfo::GetRecgroupString(pRule->m_recGroupID) );
315  pRecRule->setStorageGroup ( pRule->m_storageGroup );
316  pRecRule->setPlayGroup ( pRule->m_playGroup );
317  pRecRule->setAutoExpire ( pRule->m_autoExpire );
318  pRecRule->setMaxEpisodes ( pRule->m_maxEpisodes );
319  pRecRule->setMaxNewest ( pRule->m_maxNewest );
320  pRecRule->setAutoCommflag ( pRule->m_autoCommFlag );
321  pRecRule->setAutoTranscode ( pRule->m_autoTranscode );
322  pRecRule->setAutoMetaLookup ( pRule->m_autoMetadataLookup );
323  pRecRule->setAutoUserJob1 ( pRule->m_autoUserJob1 );
324  pRecRule->setAutoUserJob2 ( pRule->m_autoUserJob2 );
325  pRecRule->setAutoUserJob3 ( pRule->m_autoUserJob3 );
326  pRecRule->setAutoUserJob4 ( pRule->m_autoUserJob4 );
327  pRecRule->setTranscoder ( pRule->m_transcoder );
328  pRecRule->setNextRecording ( pRule->m_nextRecording );
329  pRecRule->setLastRecorded ( pRule->m_lastRecorded );
330  pRecRule->setLastDeleted ( pRule->m_lastDeleted );
331  pRecRule->setAverageDelay ( pRule->m_averageDelay );
332  pRecRule->setAutoExtend ( toString(pRule->m_autoExtend) );
333 }
334 
335 void V2FillArtworkInfoList( V2ArtworkInfoList *pArtworkInfoList,
336  const QString &sInetref,
337  uint nSeason )
338 {
339  ArtworkMap map = GetArtwork(sInetref, nSeason);
340  for (auto i = map.cbegin(); i != map.cend(); ++i)
341  {
342  V2ArtworkInfo *pArtInfo = pArtworkInfoList->AddNewArtworkInfo();
343  pArtInfo->setFileName(i.value().url);
344  switch (i.key())
345  {
346  case kArtworkFanart:
347  pArtInfo->setStorageGroup("Fanart");
348  pArtInfo->setType("fanart");
349  pArtInfo->setURL(QString("/Content/GetImageFile?StorageGroup=%1"
350  "&FileName=%2")
351  .arg("Fanart",
352  QString(QUrl::toPercentEncoding(
353  QUrl(i.value().url).path()))));
354  break;
355  case kArtworkBanner:
356  pArtInfo->setStorageGroup("Banners");
357  pArtInfo->setType("banner");
358  pArtInfo->setURL(QString("/Content/GetImageFile?StorageGroup=%1"
359  "&FileName=%2")
360  .arg("Banners",
361  QString(QUrl::toPercentEncoding(
362  QUrl(i.value().url).path()))));
363  break;
364  case kArtworkCoverart:
365  default:
366  pArtInfo->setStorageGroup("Coverart");
367  pArtInfo->setType("coverart");
368  pArtInfo->setURL(QString("/Content/GetImageFile?StorageGroup=%1"
369  "&FileName=%2")
370  .arg("Coverart",
371  QString(QUrl::toPercentEncoding(
372  QUrl(i.value().url).path()))));
373  break;
374  }
375  }
376 }
377 
378 void V2FillGenreList(V2GenreList* pGenreList, int videoID)
379 {
380  if (!pGenreList)
381  return;
382 
383  MSqlQuery query(MSqlQuery::InitCon());
384  query.prepare("SELECT genre from videogenre "
385  "LEFT JOIN videometadatagenre ON videometadatagenre.idgenre = videogenre.intid "
386  "WHERE idvideo = :ID "
387  "ORDER BY genre;");
388  query.bindValue(":ID", videoID);
389 
390  if (query.exec() && query.size() > 0)
391  {
392  while (query.next())
393  {
394  V2Genre *pGenre = pGenreList->AddNewGenre();
395  QString genre = query.value(0).toString();
396  pGenre->setName(genre);
397  }
398  }
399 }
400 
401 
403  V2VideoMetadataInfo *pVideoMetadataInfo,
405  bool bDetails)
406 {
407  pVideoMetadataInfo->setId(pMetadata->GetID());
408  pVideoMetadataInfo->setTitle(pMetadata->GetTitle());
409  pVideoMetadataInfo->setSubTitle(pMetadata->GetSubtitle());
410  pVideoMetadataInfo->setTagline(pMetadata->GetTagline());
411  pVideoMetadataInfo->setDirector(pMetadata->GetDirector());
412  pVideoMetadataInfo->setStudio(pMetadata->GetStudio());
413  pVideoMetadataInfo->setDescription(pMetadata->GetPlot());
414  pVideoMetadataInfo->setCertification(pMetadata->GetRating());
415  pVideoMetadataInfo->setInetref(pMetadata->GetInetRef());
416  pVideoMetadataInfo->setCollectionref(pMetadata->GetCollectionRef());
417  pVideoMetadataInfo->setHomePage(pMetadata->GetHomepage());
418 #if QT_VERSION < QT_VERSION_CHECK(6,5,0)
419  pVideoMetadataInfo->setReleaseDate(
420  QDateTime(pMetadata->GetReleaseDate(),
421  QTime(0,0),Qt::LocalTime).toUTC());
422  pVideoMetadataInfo->setAddDate(
423  QDateTime(pMetadata->GetInsertdate(),
424  QTime(0,0),Qt::LocalTime).toUTC());
425 #else
426  static const QTimeZone localtime(QTimeZone::LocalTime);
427  pVideoMetadataInfo->setReleaseDate(
428  QDateTime(pMetadata->GetReleaseDate(),
429  QTime(0,0),localtime).toUTC());
430  pVideoMetadataInfo->setAddDate(
431  QDateTime(pMetadata->GetInsertdate(),
432  QTime(0,0),localtime).toUTC());
433 #endif
434  pVideoMetadataInfo->setUserRating(pMetadata->GetUserRating());
435  pVideoMetadataInfo->setChildID(pMetadata->GetChildID());
436  pVideoMetadataInfo->setLength(pMetadata->GetLength().count());
437  pVideoMetadataInfo->setPlayCount(pMetadata->GetPlayCount());
438  pVideoMetadataInfo->setSeason(pMetadata->GetSeason());
439  pVideoMetadataInfo->setEpisode(pMetadata->GetEpisode());
440  pVideoMetadataInfo->setParentalLevel(pMetadata->GetShowLevel());
441  pVideoMetadataInfo->setVisible(pMetadata->GetBrowse());
442  pVideoMetadataInfo->setWatched(pMetadata->GetWatched());
443  pVideoMetadataInfo->setProcessed(pMetadata->GetProcessed());
444  pVideoMetadataInfo->setContentType(ContentTypeToString(
445  pMetadata->GetContentType()));
446  pVideoMetadataInfo->setFileName(pMetadata->GetFilename());
447  pVideoMetadataInfo->setHash(pMetadata->GetHash());
448  pVideoMetadataInfo->setHostName(pMetadata->GetHost());
449  pVideoMetadataInfo->setCoverart(pMetadata->GetCoverFile());
450  pVideoMetadataInfo->setFanart(pMetadata->GetFanart());
451  pVideoMetadataInfo->setBanner(pMetadata->GetBanner());
452  pVideoMetadataInfo->setScreenshot(pMetadata->GetScreenshot());
453  pVideoMetadataInfo->setTrailer(pMetadata->GetTrailer());
454  pVideoMetadataInfo->setCategory(pMetadata->GetCategoryID());
455 
456  if (bDetails)
457  {
458  if (!pMetadata->GetFanart().isEmpty())
459  {
460  V2ArtworkInfo *pArtInfo =
461  pVideoMetadataInfo->Artwork()->AddNewArtworkInfo();
462  pArtInfo->setStorageGroup("Fanart");
463  pArtInfo->setType("fanart");
464  pArtInfo->setURL(QString("/Content/GetImageFile?StorageGroup=%1"
465  "&FileName=%2")
466  .arg("Fanart",
467  QString(
468  QUrl::toPercentEncoding(pMetadata->GetFanart()))));
469  }
470  if (!pMetadata->GetCoverFile().isEmpty())
471  {
472  V2ArtworkInfo *pArtInfo =
473  pVideoMetadataInfo->Artwork()->AddNewArtworkInfo();
474  pArtInfo->setStorageGroup("Coverart");
475  pArtInfo->setType("coverart");
476  pArtInfo->setURL(QString("/Content/GetImageFile?StorageGroup=%1"
477  "&FileName=%2")
478  .arg("Coverart",
479  QString(
480  QUrl::toPercentEncoding(pMetadata->GetCoverFile()))));
481  }
482  if (!pMetadata->GetBanner().isEmpty())
483  {
484  V2ArtworkInfo *pArtInfo =
485  pVideoMetadataInfo->Artwork()->AddNewArtworkInfo();
486  pArtInfo->setStorageGroup("Banners");
487  pArtInfo->setType("banner");
488  pArtInfo->setURL(QString("/Content/GetImageFile?StorageGroup=%1"
489  "&FileName=%2")
490  .arg("Banners",
491  QString(
492  QUrl::toPercentEncoding(pMetadata->GetBanner()))));
493  }
494  if (!pMetadata->GetScreenshot().isEmpty())
495  {
496  V2ArtworkInfo *pArtInfo =
497  pVideoMetadataInfo->Artwork()->AddNewArtworkInfo();
498  pArtInfo->setStorageGroup("Screenshots");
499  pArtInfo->setType("screenshot");
500  pArtInfo->setURL(QString("/Content/GetImageFile?StorageGroup=%1"
501  "&FileName=%2")
502  .arg("Screenshots",
503  QString(
504  QUrl::toPercentEncoding(pMetadata->GetScreenshot()))));
505  }
506  }
507 
508  V2FillGenreList(pVideoMetadataInfo->Genres(), pVideoMetadataInfo->GetId());
509 
510  auto castList = pMetadata->GetCast();
511  V2CastMemberList* pCastMemberList = pVideoMetadataInfo->Cast();
512 
513  QString actors = QObject::tr("Actors");
514  for (const VideoMetadata::cast_entry& ent : castList )
515  {
516  V2CastMember *pCastMember = pCastMemberList->AddNewCastMember();
517  pCastMember->setTranslatedRole(actors);
518  pCastMember->setRole("ACTOR");
519  pCastMember->setName(ent.second);
520  }
521 
522 }
523 
525 //
527 
529  MusicMetadata *pMetadata, bool bDetails)
530 {
531  pVideoMetadataInfo->setId(pMetadata->ID());
532  pVideoMetadataInfo->setArtist(pMetadata->Artist());
533  pVideoMetadataInfo->setCompilationArtist(pMetadata->CompilationArtist());
534  pVideoMetadataInfo->setAlbum(pMetadata->Album());
535  pVideoMetadataInfo->setTitle(pMetadata->Title());
536  pVideoMetadataInfo->setTrackNo(pMetadata->Track());
537  pVideoMetadataInfo->setGenre(pMetadata->Genre());
538  pVideoMetadataInfo->setYear(pMetadata->Year());
539  pVideoMetadataInfo->setPlayCount(pMetadata->PlayCount());
540  pVideoMetadataInfo->setLength(pMetadata->Length().count());
541  pVideoMetadataInfo->setRating(pMetadata->Rating());
542  pVideoMetadataInfo->setFileName(pMetadata->Filename());
543  pVideoMetadataInfo->setHostName(pMetadata->Hostname());
544  pVideoMetadataInfo->setLastPlayed(pMetadata->LastPlay());
545  pVideoMetadataInfo->setCompilation(pMetadata->Compilation());
546 
547  if (bDetails)
548  {
549  //TODO add coverart here
550  }
551 }
552 
553 void V2FillInputInfo(V2Input* input, const InputInfo& inputInfo)
554 {
555  input->setId(inputInfo.m_inputId);
556  input->setInputName(inputInfo.m_name);
557  input->setCardId(inputInfo.m_inputId);
558  input->setSourceId(inputInfo.m_sourceId);
559  input->setDisplayName(inputInfo.m_displayName);
560  input->setLiveTVOrder(inputInfo.m_liveTvOrder);
561  input->setScheduleOrder(inputInfo.m_scheduleOrder);
562  input->setRecPriority(inputInfo.m_recPriority);
563  input->setQuickTune(inputInfo.m_quickTune);
564 }
565 
566 
567 
569  ProgramInfo* pInfo)
570 {
571  if (!pCastMemberList || !pInfo)
572  return;
573 
574  MSqlQuery query(MSqlQuery::InitCon());
575 
576  QString table;
577  if (pInfo->GetFilesize() > 0) // FIXME: This shouldn't be the way to determine what is or isn't a recording!
578  table = "recordedcredits";
579  else
580  table = "credits";
581 
582  query.prepare(QString("SELECT role, people.name, roles.name FROM %1"
583  " AS credits"
584  " LEFT JOIN people ON"
585  " credits.person = people.person"
586  " LEFT JOIN roles ON"
587  " credits.roleid = roles.roleid"
588  " WHERE credits.chanid = :CHANID"
589  " AND credits.starttime = :STARTTIME"
590  " ORDER BY role, priority;").arg(table));
591 
592  query.bindValue(":CHANID", pInfo->GetChanID());
593  query.bindValue(":STARTTIME", pInfo->GetScheduledStartTime());
594 
595  if (query.exec() && query.size() > 0)
596  {
597  QMap<QString, QString> translations;
598  translations["ACTOR"] = QObject::tr("Actors");
599  translations["DIRECTOR"] = QObject::tr("Director");
600  translations["PRODUCER"] = QObject::tr("Producer");
601  translations["EXECUTIVE_PRODUCER"] = QObject::tr("Executive Producer");
602  translations["WRITER"] = QObject::tr("Writer");
603  translations["GUEST_STAR"] = QObject::tr("Guest Star");
604  translations["HOST"] = QObject::tr("Host");
605  translations["ADAPTER"] = QObject::tr("Adapter");
606  translations["PRESENTER"] = QObject::tr("Presenter");
607  translations["COMMENTATOR"] = QObject::tr("Commentator");
608  translations["GUEST"] = QObject::tr("Guest");
609 
610  while (query.next())
611  {
612  V2CastMember *pCastMember = pCastMemberList->AddNewCastMember();
613 
614  QString role = query.value(0).toString();
615  pCastMember->setTranslatedRole(translations.value(role.toUpper()));
616  pCastMember->setRole(role); // role is invalid after this call.
617  /* The people.name column uses utf8_bin collation.
618  * Qt-MySQL drivers use QVariant::ByteArray for string-type
619  * MySQL fields marked with the BINARY attribute (those using a
620  * *_bin collation) and QVariant::String for all others.
621  * Since QVariant::toString() uses QString::fromAscii()
622  * (through QVariant::convert()) when the QVariant's type is
623  * QVariant::ByteArray, we have to use QString::fromUtf8()
624  * explicitly to prevent corrupting characters.
625  * The following code should be changed to use the simpler
626  * toString() approach, as above, if we do a DB update to
627  * coalesce the people.name values that differ only in case and
628  * change the collation to utf8_general_ci, to match the
629  * majority of other columns, or we'll have the same problem in
630  * reverse.
631  */
632  pCastMember->setName(QString::fromUtf8(query.value(1)
633  .toByteArray().constData()));
634  pCastMember->setCharacterName(QString::fromUtf8(query.value(2)
635  .toByteArray().constData()));
636  }
637  }
638 
639 }
640 
641 
642 void V2FillCutList(V2CutList* pCutList, ProgramInfo* rInfo, int marktype, bool includeFps)
643 {
644  frm_dir_map_t markMap;
645  frm_dir_map_t::const_iterator it;
646 
647  if (rInfo && rInfo->GetChanID())
648  {
649  if (includeFps)
650  {
651  rInfo->QueryMarkupMap(markMap, MARK_VIDEO_RATE);
652  it = markMap.cbegin();
653  if (it != markMap.cend())
654  {
655  V2Cutting *pCutting = pCutList->AddNewCutting();
656  pCutting->setMark(*it);
657  pCutting->setOffset(it.key());
658  }
659  markMap.clear();
660  }
661  rInfo->QueryCutList(markMap);
662 
663  for (it = markMap.cbegin(); it != markMap.cend(); ++it)
664  {
665  bool isend = (*it) == MARK_CUT_END || (*it) == MARK_COMM_END;
666  if (marktype == 0)
667  {
668  V2Cutting *pCutting = pCutList->AddNewCutting();
669  pCutting->setMark(*it);
670  pCutting->setOffset(it.key());
671  }
672  else if (marktype == 1)
673  {
674  uint64_t offset = 0;
675  if (rInfo->QueryKeyFramePosition(&offset, it.key(), isend))
676  {
677  V2Cutting *pCutting = pCutList->AddNewCutting();
678  pCutting->setMark(*it);
679  pCutting->setOffset(offset);
680  }
681  }
682  else if (marktype == 2)
683  {
684  uint64_t offset = 0;
685  if (rInfo->QueryKeyFrameDuration(&offset, it.key(), isend))
686  {
687  V2Cutting *pCutting = pCutList->AddNewCutting();
688  pCutting->setMark(*it);
689  pCutting->setOffset(offset);
690  }
691  }
692  }
693  }
694 }
695 
696 void V2FillCommBreak(V2CutList* pCutList, ProgramInfo* rInfo, int marktype, bool includeFps)
697 {
698  frm_dir_map_t markMap;
699  frm_dir_map_t::const_iterator it;
700 
701  if (rInfo)
702  {
703  if (includeFps)
704  {
705  rInfo->QueryMarkupMap(markMap, MARK_VIDEO_RATE);
706  it = markMap.cbegin();
707  if (it != markMap.cend())
708  {
709  V2Cutting *pCutting = pCutList->AddNewCutting();
710  pCutting->setMark(*it);
711  pCutting->setOffset(it.key());
712  }
713  markMap.clear();
714  }
715  rInfo->QueryCommBreakList(markMap);
716 
717  for (it = markMap.cbegin(); it != markMap.cend(); ++it)
718  {
719  bool isend = (*it) == MARK_CUT_END || (*it) == MARK_COMM_END;
720  if (marktype == 0)
721  {
722  V2Cutting *pCutting = pCutList->AddNewCutting();
723  pCutting->setMark(*it);
724  pCutting->setOffset(it.key());
725  }
726  else if (marktype == 1)
727  {
728  uint64_t offset = 0;
729  if (rInfo->QueryKeyFramePosition(&offset, it.key(), isend))
730  {
731  V2Cutting *pCutting = pCutList->AddNewCutting();
732  pCutting->setMark(*it);
733  pCutting->setOffset(offset);
734  }
735  }
736  else if (marktype == 2)
737  {
738  uint64_t offset = 0;
739  if (rInfo->QueryKeyFrameDuration(&offset, it.key(), isend))
740  {
741  V2Cutting *pCutting = pCutList->AddNewCutting();
742  pCutting->setMark(*it);
743  pCutting->setOffset(offset);
744  }
745  }
746  }
747  }
748 }
749 
751 //
753 
754 void V2FillSeek(V2CutList* pCutList, RecordingInfo* rInfo, MarkTypes marktype)
755 {
756  frm_pos_map_t markMap;
757  frm_pos_map_t::const_iterator it;
758 
759  if (rInfo && rInfo->GetChanID())
760  {
761  rInfo->QueryPositionMap(markMap, marktype);
762 
763  for (it = markMap.cbegin(); it != markMap.cend(); ++it)
764  {
765  V2Cutting *pCutting = pCutList->AddNewCutting();
766  pCutting->setMark(it.key());
767  pCutting->setOffset(it.value());
768  }
769  }
770 }
771 
772 void FillEncoderList(QVariantList &list, QObject* parent)
773 {
774  QReadLocker tvlocker(&TVRec::s_inputsLock);
775  QList<InputInfo> inputInfoList = CardUtil::GetAllInputInfo(true);
776  for (auto * elink : std::as_const(gTVList))
777  {
778  if (elink != nullptr)
779  {
780  // V2Encoder *pEncoder = list->AddNewEncoder();
781  auto *pEncoder = new V2Encoder( parent );
782  list.append( QVariant::fromValue<QObject *>( pEncoder ));
783 
784  pEncoder->setId ( elink->GetInputID() );
785  pEncoder->setState ( elink->GetState() );
786  pEncoder->setLocal ( elink->IsLocal() );
787  pEncoder->setConnected ( elink->IsConnected() );
788  pEncoder->setSleepStatus ( elink->GetSleepStatus() );
789 
790  if (pEncoder->GetLocal())
791  pEncoder->setHostName( gCoreContext->GetHostName() );
792  else
793  pEncoder->setHostName( elink->GetHostName() );
794 
795  for (const auto & inputInfo : std::as_const(inputInfoList))
796  {
797  if (inputInfo.m_inputId == static_cast<uint>(elink->GetInputID()))
798  {
799  V2Input *input = pEncoder->AddNewInput();
800  V2FillInputInfo(input, inputInfo);
801  }
802  }
803 
804  bool progFound = false;
805  V2Program *pProgram = pEncoder->Recording();
806  switch ( pEncoder->GetState() )
807  {
811  {
812  ProgramInfo *pInfo = elink->GetRecording();
813 
814  if (pInfo)
815  {
816  progFound= true;
817  V2FillProgramInfo( pProgram, pInfo, true, true );
818  delete pInfo;
819  }
820 
821  break;
822  }
823 
824  default:
825  break;
826  }
827  if (!progFound)
828  pProgram->setProperty("isNull",QVariant(true));
829  }
830  }
831 }
832 
833 // Note - special value -999 for nRecStatus means all values less than 0.
834 // This is needed by BackendStatus API
835 int FillUpcomingList(QVariantList &list, QObject* parent,
836  int& nStartIndex,
837  int& nCount,
838  bool bShowAll,
839  int nRecordId,
840  int nRecStatus,
841  const QString &Sort,
842  const QString &RecGroup )
843 {
844  RecordingList recordingList; // Auto-delete deque
845  RecList tmpList; // Standard deque, objects must be deleted
846 
847  if (nRecordId <= 0)
848  nRecordId = -1;
849 
850  // For nRecStatus to be effective, showAll must be true.
851  if (nRecStatus != 0)
852  bShowAll = true;
853 
854  // NOTE: Fetching this information directly from the schedule is
855  // significantly faster than using ProgramInfo::LoadFromScheduler()
856  auto *scheduler = dynamic_cast<Scheduler*>(gCoreContext->GetScheduler());
857  if (scheduler)
858  scheduler->GetAllPending(tmpList, nRecordId);
859 
860  // Sort the upcoming into only those which will record
861  // NOLINTNEXTLINE(modernize-loop-convert)
862  for (auto it = tmpList.begin(); it < tmpList.end(); ++it)
863  {
864  if ((nRecStatus == -999
865  && (*it)->GetRecordingStatus() >= 0)
866  || (nRecStatus != 0 && nRecStatus != -999
867  && (*it)->GetRecordingStatus() != nRecStatus))
868  {
869  delete *it;
870  *it = nullptr;
871  continue;
872  }
873 
874  if (!RecGroup.isEmpty())
875  {
876  if ( (*it)-> GetRecordingGroup() != RecGroup )
877  {
878  delete *it;
879  *it = nullptr;
880  continue;
881  }
882  }
883 
884  if (!bShowAll && ((((*it)->GetRecordingStatus() >= RecStatus::Pending) &&
885  ((*it)->GetRecordingStatus() <= RecStatus::WillRecord)) ||
886  ((*it)->GetRecordingStatus() == RecStatus::Offline) ||
887  ((*it)->GetRecordingStatus() == RecStatus::Conflict)) &&
888  ((*it)->GetRecordingEndTime() > MythDate::current()))
889  { // NOLINT(bugprone-branch-clone)
890  recordingList.push_back(new RecordingInfo(**it));
891  }
892  else if (bShowAll &&
893  ((*it)->GetRecordingEndTime() > MythDate::current()))
894  {
895  recordingList.push_back(new RecordingInfo(**it));
896  }
897 
898  delete *it;
899  *it = nullptr;
900  }
901 
902  // Sort the list
903 
904  int sortType = 0;
905  if (Sort.startsWith("channum", Qt::CaseInsensitive))
906  sortType = 10;
907  else if (Sort.startsWith("title", Qt::CaseInsensitive))
908  sortType = 20;
909  else if (Sort.startsWith("length", Qt::CaseInsensitive))
910  sortType = 30;
911  else if (Sort.startsWith("status", Qt::CaseInsensitive))
912  sortType = 40;
913  if (Sort.endsWith("desc", Qt::CaseInsensitive))
914  sortType += 1;
915 
916  static QRegularExpression regex("[_-]");
917 
918  auto comp = [sortType](const RecordingInfo *First, const RecordingInfo *Second)
919  {
920  switch (sortType)
921  {
922  case 0:
923  return First->GetScheduledStartTime() < Second->GetScheduledStartTime();
924  case 1:
925  return First->GetScheduledStartTime() > Second->GetScheduledStartTime();
926  case 10:
927  return First->GetChanNum().replace(regex,".").toDouble()
928  < Second->GetChanNum().replace(regex,".").toDouble();
929  case 11:
930  return First->GetChanNum().replace(regex,".").toDouble()
931  > Second->GetChanNum().replace(regex,".").toDouble();
932  case 20:
933  return QString::compare(First->GetSortTitle(), Second->GetSortTitle(), Qt::CaseInsensitive) < 0 ;
934  case 21:
935  return QString::compare(First->GetSortTitle(), Second->GetSortTitle(), Qt::CaseInsensitive) > 0 ;
936  case 30:
937  {
938  qint64 time1 = First->GetScheduledStartTime().msecsTo( First->GetScheduledEndTime());
939  qint64 time2 = Second->GetScheduledStartTime().msecsTo( Second->GetScheduledEndTime());
940  return time1 < time2 ;
941  }
942  case 31:
943  {
944  qint64 time1 = First->GetScheduledStartTime().msecsTo( First->GetScheduledEndTime());
945  qint64 time2 = Second->GetScheduledStartTime().msecsTo( Second->GetScheduledEndTime());
946  return time1 > time2 ;
947  }
948  case 40:
949  return QString::compare(RecStatus::toString(First->GetRecordingStatus()),
950  RecStatus::toString(Second->GetRecordingStatus()),
951  Qt::CaseInsensitive) < 0 ;
952  case 41:
953  return QString::compare(RecStatus::toString(First->GetRecordingStatus()),
954  RecStatus::toString(Second->GetRecordingStatus()),
955  Qt::CaseInsensitive) > 0 ;
956  }
957  return false;
958  };
959 
960  // no need to sort when zero because that is the default order from the scheduler
961  if (sortType > 0)
962  std::stable_sort(recordingList.begin(), recordingList.end(), comp);
963 
964  // ----------------------------------------------------------------------
965  // Build Response
966  // ----------------------------------------------------------------------
967 
968  nStartIndex = (nStartIndex > 0) ? std::min( nStartIndex, (int)recordingList.size() ) : 0;
969  nCount = (nCount > 0) ? std::min( nCount, (int)recordingList.size() ) : recordingList.size();
970  int nEndIndex = std::min((nStartIndex + nCount), (int)recordingList.size() );
971 
972  for( int n = nStartIndex; n < nEndIndex; n++)
973  {
974  ProgramInfo *pInfo = recordingList[ n ];
975  auto *pProgram = new V2Program( parent );
976  list.append( QVariant::fromValue<QObject *>( pProgram ));
977  V2FillProgramInfo( pProgram, pInfo, true );
978  }
979 
980  return recordingList.size();
981 }
982 
983 void FillFrontendList(QVariantList &list, QObject* parent, bool OnLine)
984 {
985  QMap<QString, Frontend*> frontends;
986  if (OnLine)
987  frontends = gBackendContext->GetConnectedFrontends();
988  else
989  frontends = gBackendContext->GetFrontends();
990 
991  for (auto * fe : std::as_const(frontends))
992  {
993  auto *pFrontend = new V2Frontend( parent );
994  list.append( QVariant::fromValue<QObject *>( pFrontend ));
995  pFrontend->setName(fe->m_name);
996  pFrontend->setIP(fe->m_ip.toString());
997  int port = gCoreContext->GetNumSettingOnHost("FrontendStatusPort",
998  fe->m_name, 6547);
999  pFrontend->setPort(port);
1000  pFrontend->setOnLine(fe->m_connectionCount > 0);
1001  }
1002 }
1003 
1004 
1005 int V2CreateRecordingGroup(const QString& groupName)
1006 {
1007  int groupID = -1;
1008  MSqlQuery query(MSqlQuery::InitCon());
1009 
1010  query.prepare("INSERT INTO recgroups SET recgroup = :NAME, "
1011  "displayname = :DISPLAYNAME");
1012  query.bindValue(":NAME", groupName);
1013  query.bindValue(":DISPLAYNAME", groupName);
1014 
1015  if (query.exec())
1016  groupID = query.lastInsertId().toInt();
1017 
1018  if (groupID <= 0)
1019  LOG(VB_GENERAL, LOG_ERR, QString("Could not create recording group (%1). "
1020  "Does it already exist?").arg(groupName));
1021 
1022  return groupID;
1023 }
1024 
1025 DBCredits * V2jsonCastToCredits(const QJsonObject &cast)
1026 {
1027  int priority = 1;
1028  auto* credits = new DBCredits;
1029 
1030  QJsonArray members = cast["CastMembers"].toArray();
1031  for (const auto & m : std::as_const(members))
1032  {
1033  QJsonObject actor = m.toObject();
1034  QString name = actor.value("Name").toString("");
1035  QString character = actor.value("CharacterName").toString("");
1036  QString role = actor.value("Role").toString("");
1037 
1038  credits->emplace_back(role, name, priority++, character);
1039  }
1040 
1041  return credits;
1042 }
1043 
1044 // Code copied from class VideoDevice
1045 V2CaptureDeviceList* getV4l2List ( const QRegularExpression &driver, const QString & cardType )
1046 {
1047  auto* pList = new V2CaptureDeviceList();
1048  uint minor_min = 0;
1049  uint minor_max = 15;
1050  QString card = QString();
1051 
1052  // /dev/v4l/video*
1053  QDir dev("/dev/v4l", "video*", QDir::Name, QDir::System);
1054  fillSelectionsFromDir(dev, minor_min, minor_max,
1055  card, driver, false, pList, cardType);
1056 
1057  // /dev/video*
1058  dev.setPath("/dev");
1059  fillSelectionsFromDir(dev, minor_min, minor_max,
1060  card, driver, false, pList, cardType);
1061 
1062  // /dev/dtv/video*
1063  dev.setPath("/dev/dtv");
1064  fillSelectionsFromDir(dev, minor_min, minor_max,
1065  card, driver, false, pList, cardType);
1066 
1067  // /dev/dtv*
1068  dev.setPath("/dev");
1069  dev.setNameFilters(QStringList("dtv*"));
1070  fillSelectionsFromDir(dev, minor_min, minor_max,
1071  card, driver, false, pList, cardType);
1072 
1073  return pList;
1074 }
1075 
1076 uint fillSelectionsFromDir(const QDir& dir,
1077  uint minor_min, uint minor_max,
1078  const QString& card, const QRegularExpression& driver,
1079  bool allow_duplicates, V2CaptureDeviceList *pList,
1080  const QString & cardType)
1081 {
1082  uint cnt = 0;
1083  QMap<uint, uint> minorlist;
1084  QFileInfoList entries = dir.entryInfoList();
1085  for (const auto & fi : std::as_const(entries))
1086  {
1087  struct stat st {};
1088  QString filepath = fi.absoluteFilePath();
1089  int err = lstat(filepath.toLocal8Bit().constData(), &st);
1090 
1091  if (err)
1092  {
1093  LOG(VB_GENERAL, LOG_ERR,
1094  QString("Could not stat file: %1").arg(filepath));
1095  continue;
1096  }
1097 
1098  // is this is a character device?
1099  if (!S_ISCHR(st.st_mode))
1100  continue;
1101 
1102  // is this device is in our minor range?
1103  uint minor_num = minor(st.st_rdev);
1104  if (minor_min > minor_num || minor_max < minor_num)
1105  continue;
1106 
1107  // ignore duplicates if allow_duplicates not set
1108  if (!allow_duplicates && minorlist[minor_num])
1109  continue;
1110 
1111  // if the driver returns any info add this device to our list
1112  QByteArray tmp = filepath.toLatin1();
1113  int videofd = open(tmp.constData(), O_RDWR);
1114  if (videofd >= 0)
1115  {
1116  QString card_name;
1117  QString driver_name;
1118  if (CardUtil::GetV4LInfo(videofd, card_name, driver_name))
1119  {
1120  auto match = driver.match(driver_name);
1121  if ((!driver.pattern().isEmpty() || match.hasMatch()) &&
1122  (card.isEmpty() || (card_name == card)))
1123  {
1124  auto* pDev = pList->AddCaptureDevice();
1125  pDev->setCardType (cardType);
1126  pDev->setVideoDevice (filepath);
1127  pDev->setFrontendName(card_name);
1128  QStringList inputs;
1129  CardUtil::GetDeviceInputNames(filepath, cardType, inputs);
1130  pDev->setInputNames(inputs);
1131  inputs = CardUtil::ProbeAudioInputs(filepath, cardType);
1132  pDev->setAudioDevices(inputs);
1133  if (cardType == "HDPVR")
1134  pDev->setChannelTimeout ( 15000 );
1135  cnt++;
1136  }
1137  }
1138  close(videofd);
1139  }
1140  // add to list of minors discovered to avoid duplicates
1141  minorlist[minor_num] = 1;
1142  }
1143 
1144  return cnt;
1145 }
1146 
1147 V2CaptureDeviceList* getFirewireList ([[maybe_unused]] const QString & cardType)
1148 {
1149  auto* pList = new V2CaptureDeviceList();
1150 
1151 #if CONFIG_FIREWIRE
1152  std::vector<AVCInfo> list = FirewireDevice::GetSTBList();
1153  for (auto & info : list)
1154  {
1155  auto* pDev = pList->AddCaptureDevice();
1156  pDev->setCardType (cardType);
1157  QString guid = info.GetGUIDString();
1158  pDev->setVideoDevice (guid);
1159  QString model = FirewireDevice::GetModelName(info.m_vendorid, info.m_modelid);
1160  pDev->setFirewireModel(model);
1161  pDev->setDescription(info.m_product_name);
1162  pDev->setSignalTimeout ( 2000 );
1163  pDev->setChannelTimeout ( 9000 );
1164  }
1165 #endif // CONFIG_FIREWIRE
1166  return pList;
1167 }
ChannelInfo
Definition: channelinfo.h:31
V2FillGenreList
void V2FillGenreList(V2GenreList *pGenreList, int videoID)
Definition: v2serviceUtil.cpp:378
ChannelGroupItem::m_grpId
uint m_grpId
Definition: channelgroup.h:28
RecordingRule::m_channelid
int m_channelid
callsign?
Definition: recordingrule.h:100
ProgramInfo::GetSortTitle
QString GetSortTitle(void) const
Definition: programinfo.h:363
Scheduler
Definition: scheduler.h:45
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:812
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:127
V2CaptureDeviceList::AddCaptureDevice
V2CaptureDevice * AddCaptureDevice()
Definition: v2captureCardList.h:117
RecordingRule::m_autoTranscode
bool m_autoTranscode
Definition: recordingrule.h:133
ChannelInfo::m_serviceType
uint m_serviceType
Definition: channelinfo.h:112
RecordingRule::m_enddate
QDate m_enddate
Definition: recordingrule.h:91
MusicMetadata::Title
QString Title() const
Definition: musicmetadata.h:161
RecordingRule::m_playGroup
QString m_playGroup
Definition: recordingrule.h:123
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:93
MSqlQuery::size
int size(void) const
Definition: mythdbcon.h:214
RecordingRule::m_seriesid
QString m_seriesid
Definition: recordingrule.h:85
RecordingRule::m_parentRecID
int m_parentRecID
Definition: recordingrule.h:72
MusicMetadata::Filename
QString Filename(bool find=true)
Definition: musicmetadata.cpp:977
ProgramInfo::GetFilesize
virtual uint64_t GetFilesize(void) const
Definition: programinfo.cpp:6518
MARK_COMM_END
@ MARK_COMM_END
Definition: programtypes.h:59
backendcontext.h
V2FillProgramInfo
void V2FillProgramInfo(V2Program *pProgram, ProgramInfo *pInfo, bool bIncChannel, bool bDetails, bool bIncCast, bool bIncArtwork, bool bIncRecording)
Definition: v2serviceUtil.cpp:43
RecordingRule::m_description
QString m_description
Definition: recordingrule.h:82
MusicMetadata::Genre
QString Genre() const
Definition: musicmetadata.h:174
RecordingRule::m_autoCommFlag
bool m_autoCommFlag
Definition: recordingrule.h:132
RecordingRule::m_inetref
QString m_inetref
Definition: recordingrule.h:88
ProgramInfo::GetHostname
QString GetHostname(void) const
Definition: programinfo.h:422
ProgramInfo::GetInputName
QString GetInputName(void) const
Definition: programinfo.h:468
MythCoreContext::GetScheduler
MythScheduler * GetScheduler(void)
Definition: mythcorecontext.cpp:1932
RecordingRule::m_maxNewest
bool m_maxNewest
Definition: recordingrule.h:128
ProgramInfo::QueryPositionMap
void QueryPositionMap(frm_pos_map_t &posMap, MarkTypes type) const
Definition: programinfo.cpp:3794
RecordingRule::m_category
QString m_category
Definition: recordingrule.h:83
toRawString
QString toRawString(RecordingType rectype)
Converts "rectype" into an untranslated string.
Definition: recordingtypes.cpp:76
RecordingRule::m_nextRecording
QDateTime m_nextRecording
Definition: recordingrule.h:143
ChannelInfo::m_chanId
uint m_chanId
Definition: channelinfo.h:85
RecordingRule::m_starttime
QTime m_starttime
Definition: recordingrule.h:92
V2RecordingInfo
Definition: v2recording.h:23
V2ArtworkInfoList
Definition: v2artworkInfoList.h:22
V2Program::Recording
QObject Recording
Definition: v2programAndChannel.h:150
MusicMetadata::CompilationArtist
QString CompilationArtist() const
Definition: musicmetadata.h:137
simple_ref_ptr
Definition: quicksp.h:24
ChannelInfo::m_freqId
QString m_freqId
Definition: channelinfo.h:87
V2FillVideoMetadataInfo
void V2FillVideoMetadataInfo(V2VideoMetadataInfo *pVideoMetadataInfo, const VideoMetadataListManager::VideoMetadataPtr &pMetadata, bool bDetails)
Definition: v2serviceUtil.cpp:402
FirewireDevice::GetModelName
static QString GetModelName(uint vendor_id, uint model_id)
Definition: firewiredevice.cpp:351
ChannelGroupItem
Definition: channelgroup.h:15
RecordingInfo
Holds information on a TV Program one might wish to record.
Definition: recordinginfo.h:35
newEpifromDupIn
bool newEpifromDupIn(RecordingDupInType recdupin)
Definition: recordingtypes.cpp:211
ProgramInfo::GetRecTypeStatus
QString GetRecTypeStatus(bool showrerecord) const
Definition: programinfo.cpp:1515
RecordingInfo::GetFilesize
uint64_t GetFilesize(void) const override
Definition: recordinginfo.cpp:1779
MarkTypes
MarkTypes
Definition: programtypes.h:46
V2VideoMetadataInfo::Cast
QObject Cast
Definition: v2videoMetadataInfo.h:48
ProgramInfo::GetRecordingID
uint GetRecordingID(void) const
Definition: programinfo.h:450
ProgramInfo::GetChanNum
QString GetChanNum(void) const
This is the channel "number", in the form 1, 1_2, 1-2, 1#1, etc.
Definition: programinfo.h:377
ChannelInfo::m_fineTune
int m_fineTune
Definition: channelinfo.h:95
MSqlQuery::lastInsertId
QVariant lastInsertId()
Return the id of the last inserted row.
Definition: mythdbcon.cpp:935
RecordingRule::m_title
QString m_title
Definition: recordingrule.h:78
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:204
V2ChannelGroup
Definition: v2channelGroup.h:19
ProgramInfo::GetCategory
QString GetCategory(void) const
Definition: programinfo.h:370
RecordingRule::m_averageDelay
int m_averageDelay
Definition: recordingrule.h:142
GetArtwork
ArtworkMap GetArtwork(const QString &inetref, uint season, bool strict)
Definition: metadataimagehelper.cpp:10
frm_dir_map_t
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:117
RecordingRule::m_lastDeleted
QDateTime m_lastDeleted
Definition: recordingrule.h:145
RecStatus::Unknown
@ Unknown
Definition: recordingstatus.h:32
RecordingRule
Internal representation of a recording rule, mirrors the record table.
Definition: recordingrule.h:29
RecordingRule::m_endOffset
int m_endOffset
Definition: recordingrule.h:111
ChannelInfo::m_atscMajorChan
uint m_atscMajorChan
Definition: channelinfo.h:113
MusicMetadata::ID
IdType ID() const
Definition: musicmetadata.h:217
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:618
V2Frontend
Definition: v2frontend.h:18
VideoMetadata::cast_entry
std::pair< int, QString > cast_entry
Definition: videometadata.h:31
ChannelInfo::m_name
QString m_name
Definition: channelinfo.h:92
MusicMetadata::Track
int Track() const
Definition: musicmetadata.h:198
FillUpcomingList
int FillUpcomingList(QVariantList &list, QObject *parent, int &nStartIndex, int &nCount, bool bShowAll, int nRecordId, int nRecStatus, const QString &Sort, const QString &RecGroup)
Definition: v2serviceUtil.cpp:835
ContentTypeToString
QString ContentTypeToString(VideoContentType type)
Definition: videoutils.cpp:295
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
ProgramInfo::GetScheduledEndTime
QDateTime GetScheduledEndTime(void) const
The scheduled end time of the program.
Definition: programinfo.h:398
ProgramInfo::QueryKeyFrameDuration
bool QueryKeyFrameDuration(uint64_t *duration, uint64_t keyframe, bool backwards) const
Definition: programinfo.cpp:4248
firewiredevice.h
MusicMetadata
Definition: musicmetadata.h:80
MusicMetadata::Length
std::chrono::milliseconds Length() const
Definition: musicmetadata.h:204
gBackendContext
BackendContext * gBackendContext
Definition: backendcontext.cpp:9
recordingtypes.h
RecordingRule::m_dupIn
RecordingDupInType m_dupIn
Definition: recordingrule.h:115
RecordingRule::m_isInactive
bool m_isInactive
Recording rule is enabled?
Definition: recordingrule.h:75
ProgramInfo::GetRecordingEndTime
QDateTime GetRecordingEndTime(void) const
Approximate time the recording should have ended, did end, or is intended to end.
Definition: programinfo.h:413
ProgramInfo::GetProgramFlags
uint32_t GetProgramFlags(void) const
Definition: programinfo.h:474
ProgramInfo::GetRecordingGroup
QString GetRecordingGroup(void) const
Definition: programinfo.h:420
getV4l2List
V2CaptureDeviceList * getV4l2List(const QRegularExpression &driver, const QString &cardType)
Definition: v2serviceUtil.cpp:1045
MusicMetadata::Artist
QString Artist() const
Definition: musicmetadata.h:125
ProgramInfo::GetRecordingPriority
int GetRecordingPriority(void) const
Definition: programinfo.h:444
V2CaptureDeviceList
Definition: v2captureCardList.h:97
RecordingRule::m_season
uint m_season
Definition: recordingrule.h:95
FirewireDevice::GetSTBList
static std::vector< AVCInfo > GetSTBList(void)
Definition: firewiredevice.cpp:364
V2Program::Channel
QObject Channel
Definition: v2programAndChannel.h:149
ChannelInfo::m_icon
QString m_icon
Definition: channelinfo.h:93
scheduler.h
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:15
ProgramInfo::GetRecordingStartTime
QDateTime GetRecordingStartTime(void) const
Approximate time the recording started.
Definition: programinfo.h:405
ProgramInfo::GetPathname
QString GetPathname(void) const
Definition: programinfo.h:344
FillFrontendList
void FillFrontendList(QVariantList &list, QObject *parent, bool OnLine)
Definition: v2serviceUtil.cpp:983
close
#define close
Definition: compat.h:39
tmp
static guint32 * tmp
Definition: goom_core.cpp:26
programtypes.h
DBCredits
std::vector< DBPerson > DBCredits
Definition: programdata.h:73
RecStatus::toString
static QString toString(RecStatus::Type recstatus, uint id)
Converts "recstatus" into a short (unreadable) string.
Definition: recordingstatus.cpp:40
V2CutList::AddNewCutting
V2Cutting * AddNewCutting()
Definition: v2cutList.h:43
AutoDeleteDeque::begin
iterator begin(void)
Definition: autodeletedeque.h:50
ProgramInfo::IsRepeat
bool IsRepeat(void) const
Definition: programinfo.h:492
RecStatus::WillRecord
@ WillRecord
Definition: recordingstatus.h:31
RecordingInfo::GetProgramRecordingProfile
QString GetProgramRecordingProfile(void) const
Returns recording profile name that will be, or was used, for this program, creating "record" field i...
Definition: recordinginfo.cpp:496
ProgramInfo::GetInetRef
QString GetInetRef(void) const
Definition: programinfo.h:441
V2FillCommBreak
void V2FillCommBreak(V2CutList *pCutList, ProgramInfo *rInfo, int marktype, bool includeFps)
Definition: v2serviceUtil.cpp:696
ProgramInfo::GetVideoPropertyNames
QString GetVideoPropertyNames(void) const
Definition: programinfo.cpp:1555
RecordingRule::m_startOffset
int m_startOffset
Definition: recordingrule.h:110
ProgramInfo::GetYearOfInitialRelease
uint GetYearOfInitialRelease(void) const
Definition: programinfo.h:424
ChannelInfo::m_commMethod
int m_commMethod
Definition: channelinfo.h:119
V2FillInputInfo
void V2FillInputInfo(V2Input *input, const InputInfo &inputInfo)
Definition: v2serviceUtil.cpp:553
ChannelInfo::m_useOnAirGuide
bool m_useOnAirGuide
Definition: channelinfo.h:108
RecordingRule::m_episode
uint m_episode
Definition: recordingrule.h:96
kArtworkCoverart
@ kArtworkCoverart
Definition: metadataimagehelper.h:11
InputInfo::m_recPriority
int m_recPriority
Definition: inputinfo.h:53
minor
#define minor(X)
Definition: compat.h:74
programinfo.h
ProgramInfo::GetScheduledStartTime
QDateTime GetScheduledStartTime(void) const
The scheduled start time of program.
Definition: programinfo.h:391
kArtworkFanart
@ kArtworkFanart
Definition: metadataimagehelper.h:12
mythlogging.h
ProgramInfo::GetRecordingStatus
RecStatus::Type GetRecordingStatus(void) const
Definition: programinfo.h:451
V2VideoMetadataInfo::Artwork
QObject Artwork
Definition: v2videoMetadataInfo.h:47
v2serviceUtil.h
InputInfo::m_liveTvOrder
uint m_liveTvOrder
order for live TV use
Definition: inputinfo.h:55
RecordingRule::m_autoUserJob4
bool m_autoUserJob4
Definition: recordingrule.h:137
CardUtil::GetV4LInfo
static bool GetV4LInfo(int videofd, QString &input, QString &driver, uint32_t &version, uint32_t &capabilities)
Definition: cardutil.cpp:2355
V2FillRecRuleInfo
void V2FillRecRuleInfo(V2RecRule *pRecRule, RecordingRule *pRule)
Definition: v2serviceUtil.cpp:269
ProgramInfo::GetProgramFlagNames
QString GetProgramFlagNames(void) const
Definition: programinfo.cpp:1509
ProgramInfo::GetSubtitleTypeNames
QString GetSubtitleTypeNames(void) const
Definition: programinfo.cpp:1549
ChannelInfo::GetGroupIds
QList< uint > GetGroupIds() const
Definition: channelinfo.h:57
v2encoder.h
FillEncoderList
void FillEncoderList(QVariantList &list, QObject *parent)
Definition: v2serviceUtil.cpp:772
ChannelInfo::m_atscMinorChan
uint m_atscMinorChan
Definition: channelinfo.h:114
RecordingInfo::GetRecgroupString
static QString GetRecgroupString(uint recGroupID)
Temporary helper during transition from string to ID.
Definition: recordinginfo.cpp:1729
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:550
ProgramInfo::GetTitle
QString GetTitle(void) const
Definition: programinfo.h:362
ProgramInfo::GetDescription
QString GetDescription(void) const
Definition: programinfo.h:366
compat.h
kArtworkBanner
@ kArtworkBanner
Definition: metadataimagehelper.h:13
RecordingRule::m_autoUserJob2
bool m_autoUserJob2
Definition: recordingrule.h:135
BackendContext::GetFrontends
QMap< QString, Frontend * > GetFrontends() const
Definition: backendcontext.h:43
V2FillSeek
void V2FillSeek(V2CutList *pCutList, RecordingInfo *rInfo, MarkTypes marktype)
Definition: v2serviceUtil.cpp:754
ProgramInfo::GetEpisodeTotal
uint GetEpisodeTotal(void) const
Definition: programinfo.h:369
RecordingRule::m_findtime
QTime m_findtime
Time for timeslot rules.
Definition: recordingrule.h:102
V2FillCastMemberList
void V2FillCastMemberList(V2CastMemberList *pCastMemberList, ProgramInfo *pInfo)
Definition: v2serviceUtil.cpp:568
RecordingRule::m_lastRecorded
QDateTime m_lastRecorded
Definition: recordingrule.h:144
RecordingRule::m_autoExpire
bool m_autoExpire
Definition: recordingrule.h:127
V2Encoder
Definition: v2encoder.h:23
RecordingRule::m_recProfile
QString m_recProfile
Definition: recordingrule.h:121
ChannelInfo::m_chanNum
QString m_chanNum
Definition: channelinfo.h:86
ProgramInfo::QueryCutList
bool QueryCutList(frm_dir_map_t &delMap, bool loadAutosave=false) const
Definition: programinfo.cpp:3485
RecordingRule::m_searchType
RecSearchType m_searchType
Definition: recordingrule.h:113
RecordingRule::m_type
RecordingType m_type
Definition: recordingrule.h:112
RecStatus::Conflict
@ Conflict
Definition: recordingstatus.h:39
MythCoreContext::GetNumSettingOnHost
int GetNumSettingOnHost(const QString &key, const QString &host, int defaultval=0)
Definition: mythcorecontext.cpp:950
RecordingRule::m_subtitle
QString m_subtitle
Definition: recordingrule.h:80
V2FillChannelGroup
void V2FillChannelGroup(V2ChannelGroup *pGroup, const ChannelGroupItem &pGroupItem)
Definition: v2serviceUtil.cpp:255
ProgramInfo::GetAudioProperties
uint GetAudioProperties(void) const
Definition: programinfo.h:502
V2CutList
Definition: v2cutList.h:21
kState_WatchingLiveTV
@ kState_WatchingLiveTV
Watching LiveTV is the state for when we are watching a recording and the user has control over the c...
Definition: tv.h:66
ProgramInfo::GetPlaybackGroup
QString GetPlaybackGroup(void) const
Definition: programinfo.h:421
V2Genre
Definition: v2genre.h:21
RecordingRule::m_findday
int m_findday
Day of the week for once per week etc.
Definition: recordingrule.h:105
V2FillChannelInfo
bool V2FillChannelInfo(V2ChannelInfo *pChannel, uint nChanID, bool bDetails)
Definition: v2serviceUtil.cpp:171
ChannelInfo::m_tmOffset
int m_tmOffset
Definition: channelinfo.h:120
RecordingRule::m_filter
unsigned m_filter
Definition: recordingrule.h:116
V2Program::Artwork
QObject Artwork
Definition: v2programAndChannel.h:151
TVRec::s_inputsLock
static QReadWriteLock s_inputsLock
Definition: tv_rec.h:434
gTVList
QMap< int, EncoderLink * > gTVList
Definition: backendcontext.cpp:7
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:57
ProgramInfo::GetSeriesID
QString GetSeriesID(void) const
Definition: programinfo.h:439
MARK_VIDEO_RATE
@ MARK_VIDEO_RATE
Definition: programtypes.h:72
ChannelGroupItem::m_name
QString m_name
Definition: channelgroup.h:29
V2ArtworkInfoList::AddNewArtworkInfo
V2ArtworkInfo * AddNewArtworkInfo()
Definition: v2artworkInfoList.h:46
AutoDeleteDeque::end
iterator end(void)
Definition: autodeletedeque.h:51
V2CreateRecordingGroup
int V2CreateRecordingGroup(const QString &groupName)
Definition: v2serviceUtil.cpp:1005
ProgramInfo::GetStorageGroup
QString GetStorageGroup(void) const
Definition: programinfo.h:423
RecordingRule::m_maxEpisodes
int m_maxEpisodes
Definition: recordingrule.h:126
RecStatus::Offline
@ Offline
Definition: recordingstatus.h:44
ProgramInfo::GetOriginalAirDate
QDate GetOriginalAirDate(void) const
Definition: programinfo.h:432
RecordingRule::m_programid
QString m_programid
Definition: recordingrule.h:86
kState_WatchingRecording
@ kState_WatchingRecording
Watching Recording is the state for when we are watching an in progress recording,...
Definition: tv.h:83
channelutil.h
frm_pos_map_t
QMap< long long, long long > frm_pos_map_t
Frame # -> File offset map.
Definition: programtypes.h:44
InputInfo::m_inputId
uint m_inputId
unique key in DB for this input
Definition: inputinfo.h:49
ProgramInfo::GetVideoProperties
uint GetVideoProperties(void) const
Definition: programinfo.h:500
RecStatus::Pending
@ Pending
Definition: recordingstatus.h:17
RecordingRule::m_recGroupID
uint m_recGroupID
Definition: recordingrule.h:124
RecordingRule::m_endtime
QTime m_endtime
Definition: recordingrule.h:93
MusicMetadata::Album
QString Album() const
Definition: musicmetadata.h:149
InputInfo::m_quickTune
bool m_quickTune
Definition: inputinfo.h:56
BackendContext::GetConnectedFrontends
QMap< QString, Frontend * > GetConnectedFrontends() const
Definition: backendcontext.h:42
ProgramInfo::GetDuplicateCheckMethod
RecordingDupMethodType GetDuplicateCheckMethod(void) const
What should be compared to determine if two programs are the same?
Definition: programinfo.h:463
AutoDeleteDeque
Definition: autodeletedeque.h:8
channelinfo.h
ProgramInfo::GetInputID
uint GetInputID(void) const
Definition: programinfo.h:467
V2MusicMetadataInfo
Definition: v2musicMetadataInfo.h:22
InputInfo::m_scheduleOrder
uint m_scheduleOrder
Definition: inputinfo.h:54
InputInfo::m_sourceId
uint m_sourceId
associated channel listings source
Definition: inputinfo.h:48
recordinginfo.h
lstat
#define lstat
Definition: compat.h:120
RecordingRule::m_storageGroup
QString m_storageGroup
Definition: recordingrule.h:122
ProgramInfo::GetChanID
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
Definition: programinfo.h:373
ProgramInfo::GetRecordingRuleType
RecordingType GetRecordingRuleType(void) const
Definition: programinfo.h:455
ProgramInfo::GetEpisode
uint GetEpisode(void) const
Definition: programinfo.h:368
RecordingRule::m_transcoder
int m_transcoder
Definition: recordingrule.h:131
RecordingRule::m_autoUserJob1
bool m_autoUserJob1
Definition: recordingrule.h:134
AutoDeleteDeque::push_back
void push_back(T info)
Definition: autodeletedeque.h:69
V2Program::Cast
QObject Cast
Definition: v2programAndChannel.h:152
ChannelInfo::m_serviceId
uint m_serviceId
Definition: channelinfo.h:111
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
channelgroup.h
RecordingRule::m_recordID
int m_recordID
Unique Recording Rule ID.
Definition: recordingrule.h:71
ProgramInfo::GetAudioPropertyNames
QString GetAudioPropertyNames(void) const
Definition: programinfo.cpp:1560
ProgramInfo::QueryKeyFramePosition
bool QueryKeyFramePosition(uint64_t *position, uint64_t keyframe, bool backwards) const
Definition: programinfo.cpp:4230
MusicMetadata::Hostname
QString Hostname(void)
Definition: musicmetadata.h:229
getFirewireList
V2CaptureDeviceList * getFirewireList([[maybe_unused]] const QString &cardType)
Definition: v2serviceUtil.cpp:1147
ProgramInfo::QueryMarkupMap
void QueryMarkupMap(frm_dir_map_t &marks, MarkTypes type, bool merge=false) const
Definition: programinfo.cpp:3684
MARK_CUT_END
@ MARK_CUT_END
Definition: programtypes.h:54
ProgramInfo::GetLastModifiedTime
QDateTime GetLastModifiedTime(void) const
Definition: programinfo.h:433
mythscheduler.h
V2CastMember
Definition: v2castMember.h:19
ProgramInfo::GetSeason
uint GetSeason(void) const
Definition: programinfo.h:367
mythcorecontext.h
cardutil.h
v2frontend.h
RecordingRule::m_dupMethod
RecordingDupMethodType m_dupMethod
Definition: recordingrule.h:114
ProgramInfo::GetCategoryTypeString
QString GetCategoryTypeString(void) const
Returns catType as a string.
Definition: programinfo.cpp:1908
V2FillMusicMetadataInfo
void V2FillMusicMetadataInfo(V2MusicMetadataInfo *pVideoMetadataInfo, MusicMetadata *pMetadata, bool bDetails)
Definition: v2serviceUtil.cpp:528
ChannelInfo::Load
bool Load(uint lchanid=-1)
Definition: channelinfo.cpp:131
MSqlQuery::bindValue
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:888
MusicMetadata::LastPlay
QDateTime LastPlay() const
Definition: musicmetadata.h:243
MusicMetadata::Compilation
bool Compilation() const
Definition: musicmetadata.h:251
ChannelInfo::m_sourceId
uint m_sourceId
Definition: channelinfo.h:89
CardUtil::ProbeAudioInputs
static QStringList ProbeAudioInputs(const QString &device, const QString &inputtype=QString())
Definition: cardutil.cpp:2542
RecList
std::deque< RecordingInfo * > RecList
Definition: mythscheduler.h:12
ChannelInfo::m_tvFormat
QString m_tvFormat
Definition: channelinfo.h:105
V2Program
Definition: v2programAndChannel.h:107
RecordingRule::m_autoExtend
AutoExtendType m_autoExtend
Definition: recordingrule.h:117
ChannelInfo::m_recPriority
int m_recPriority
Definition: channelinfo.h:98
tv_rec.h
ProgramInfo::GetDuplicateCheckSource
RecordingDupInType GetDuplicateCheckSource(void) const
Where should we check for duplicates?
Definition: programinfo.h:459
MusicMetadata::PlayCount
int PlayCount() const
Definition: musicmetadata.h:247
InputInfo
Definition: inputinfo.h:14
V2CastMemberList
Definition: v2castMemberList.h:13
kState_RecordingOnly
@ kState_RecordingOnly
Recording Only is a TVRec only state for when we are recording a program, but there is no one current...
Definition: tv.h:87
ChannelInfo::m_xmltvId
QString m_xmltvId
Definition: channelinfo.h:97
V2CastMemberList::AddNewCastMember
V2CastMember * AddNewCastMember()
Definition: v2castMemberList.h:37
ArtworkMap
QMultiMap< VideoArtworkType, ArtworkInfo > ArtworkMap
Definition: metadataimagehelper.h:31
ProgramInfo::QueryCommBreakList
void QueryCommBreakList(frm_dir_map_t &frames) const
Definition: programinfo.cpp:3571
MythCoreContext::GetHostName
QString GetHostName(void)
Definition: mythcorecontext.cpp:845
ChannelInfo::m_videoFilters
QString m_videoFilters
Definition: channelinfo.h:96
Scheduler::GetAllPending
bool GetAllPending(RecList &retList, int recRuleId=0) const
Definition: scheduler.cpp:1746
MusicMetadata::Rating
int Rating() const
Definition: musicmetadata.h:238
V2GenreList
Definition: v2genreList.h:22
ProgramInfo::GetProgramID
QString GetProgramID(void) const
Definition: programinfo.h:440
azlyrics.info
dictionary info
Definition: azlyrics.py:7
ChannelInfo::GetInputIds
QList< uint > GetInputIds() const
Definition: channelinfo.h:67
RecordingRule::m_station
QString m_station
Definition: recordingrule.h:99
V2FillCutList
void V2FillCutList(V2CutList *pCutList, ProgramInfo *rInfo, int marktype, bool includeFps)
Definition: v2serviceUtil.cpp:642
ProgramInfo::GetRecordingRuleID
uint GetRecordingRuleID(void) const
Definition: programinfo.h:453
fillSelectionsFromDir
uint fillSelectionsFromDir(const QDir &dir, uint minor_min, uint minor_max, const QString &card, const QRegularExpression &driver, bool allow_duplicates, V2CaptureDeviceList *pList, const QString &cardType)
Definition: v2serviceUtil.cpp:1076
V2VideoMetadataInfo::Genres
QObject Genres
Definition: v2videoMetadataInfo.h:49
CardUtil::GetAllInputInfo
static QList< InputInfo > GetAllInputInfo(bool virtTuners)
Definition: cardutil.cpp:1735
RecordingRule::m_recPriority
int m_recPriority
Definition: recordingrule.h:108
CardUtil::GetDeviceInputNames
static void GetDeviceInputNames(const QString &device, const QString &inputtype, QStringList &inputs)
Definition: cardutil.cpp:2660
V2GenreList::AddNewGenre
V2Genre * AddNewGenre()
Definition: v2genreList.h:48
ProgramInfo::GetSubtitleType
uint GetSubtitleType(void) const
Definition: programinfo.h:498
RecordingRule::m_autoUserJob3
bool m_autoUserJob3
Definition: recordingrule.h:136
ChannelInfo::m_mplexId
uint m_mplexId
Definition: channelinfo.h:110
ChannelInfo::m_visible
ChannelVisibleType m_visible
Definition: channelinfo.h:106
V2FillArtworkInfoList
void V2FillArtworkInfoList(V2ArtworkInfoList *pArtworkInfoList, const QString &sInetref, uint nSeason)
Definition: v2serviceUtil.cpp:335
V2ArtworkInfo
Definition: v2artworkInfo.h:21
InputInfo::m_displayName
QString m_displayName
Definition: inputinfo.h:52
V2Input
Definition: v2input.h:20
videoutils.h
MusicMetadata::Year
int Year() const
Definition: musicmetadata.h:195
RecordingRule::m_startdate
QDate m_startdate
Definition: recordingrule.h:90
ChannelInfo::m_defaultAuthority
QString m_defaultAuthority
Definition: channelinfo.h:118
ChannelInfo::m_callSign
QString m_callSign
Definition: channelinfo.h:91
RecordingRule::m_autoMetadataLookup
bool m_autoMetadataLookup
Definition: recordingrule.h:138
V2ChannelInfo
Definition: v2programAndChannel.h:27
AutoDeleteDeque::size
size_t size(void) const
Definition: autodeletedeque.h:67
V2Cutting
Definition: v2cutting.h:19
RecordingRule::m_prefInput
int m_prefInput
Definition: recordingrule.h:109
kChannelNotVisible
@ kChannelNotVisible
Definition: channelinfo.h:24
V2jsonCastToCredits
DBCredits * V2jsonCastToCredits(const QJsonObject &cast)
Definition: v2serviceUtil.cpp:1025
uint
unsigned int uint
Definition: freesurround.h:24
V2VideoMetadataInfo
Definition: v2videoMetadataInfo.h:9
InputInfo::m_name
QString m_name
input name
Definition: inputinfo.h:47
MSqlQuery::prepare
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:837
V2RecRule
Definition: v2recRule.h:12
ProgramInfo::GetSubtitle
QString GetSubtitle(void) const
Definition: programinfo.h:364
ProgramInfo::GetStars
float GetStars(void) const
Definition: programinfo.h:446