Go to the documentation of this file.
7 #include <QCoreApplication>
55 #define LOC QString("PlaybackBox: ")
56 #define LOC_WARN QString("PlaybackBox Warning: ")
57 #define LOC_ERR QString("PlaybackBox Error: ")
87 return (dt1 < dt2 ? 1 : -1);
100 return (dt1 > dt2 ? 1 : -1);
206 static const std::array<const uint,3>
s_artDelay
225 QString sTitle = sortTitle.isEmpty()
226 ? title : sortTitle +
" - " + title;
255 sortprefix = QString(
"+%1").arg(1000 - recpriority, 3, 10, QChar(
'0'));
257 sortprefix = QString(
"-%1").arg(-recpriority, 3, 10, QChar(
'0'));
259 sTitle = sortprefix +
'-' + sTitle;
266 QString state(
"normal");
282 if ((state ==
"normal" || state ==
"running") &&
293 QString job =
"default";
306 job =
"commflagging";
326 const ProgramInfo &pginfo,
const QString &groupname)
329 if (groupname != pginfo.
GetTitle().toLower())
336 if (subtitle.trimmed().isEmpty())
346 list.push_back(QString() );
347 list.push_back(QString());
358 recordingID = list[0].toUInt();
364 if (recordingID == 0U) {
365 LOG(VB_GENERAL, LOG_ERR,
LOC +
"extract_one_del() invalid entry");
375 auto *pbb =
new PlaybackBox(mainStack,
"playbackbox", (
TV *)player, showTV);
389 m_groupDisplayName(
ProgramInfo::i18n(
"All Programs")),
390 m_recGroup(
"All Programs"),
391 m_watchGroupName(tr(
"Watch List")),
392 m_watchGroupLabel(m_watchGroupName.toLower()),
395 m_programInfoCache(this),
421 "DisplayGroupDefaultViewMask",
463 (displayCat &&
m_recGroup !=
"All Programs") ?
"category" :
"recgroup";
515 LOG(VB_GENERAL, LOG_ERR,
LOC +
516 "Theme is missing critical theme elements.");
570 "titlesubtitle|shortdate|starttime");
613 QString label = tr(
"Password for group '%1':").arg(newRecGroup);
651 const QString &grouplabel)
657 infoMap[
"title"] = grouplabel;
664 if (!groupname.isEmpty() && !
m_progLists[groupname].empty())
689 if (countInGroup >= 1)
692 float groupSize = 0.0;
694 for (
auto *info : group)
698 uint64_t filesize = info->GetFilesize();
705 groupSize += filesize;
709 desc = tr(
"There is/are %n recording(s) in this display "
710 "group, which consume(s) %1 GiB.",
"", countInGroup)
711 .arg(groupSize / 1024.0F / 1024.0F / 1024.0F, 0,
'f', 2);
715 desc = tr(
"There is no recording in this display group.");
718 infoMap[
"description"] = desc;
719 infoMap[
"rec_count"] = QString(
"%1").arg(countInGroup);
728 ratingState->
Reset();
748 bool force_preview_reload)
764 LOG(VB_GENERAL, LOG_DEBUG,
LOC +
765 QString(
"UpdateUIListItem called with a title unknown "
766 "to us in m_recordingList\n\t\t\t%1")
771 static const std::array<const std::string,9>
disp_flags
773 "playlist",
"watched",
"preserve",
774 "cutlist",
"autoexpire",
"editing",
775 "bookmark",
"inuse",
"transcoded"
790 disp_flag_stat[8] = ((pginfo->
GetProgramFlags() & FL_TRANSCODED) != 0U);
792 for (
size_t i = 0; i <
disp_flags.size(); ++i)
798 bool is_sel,
bool force_preview_reload)
815 pginfo->ToMap(infoMap);
823 if (groupname == pginfo->GetTitle().toLower())
825 item->
SetText(tempSubTitle,
"titlesubtitle");
829 "titlesubtitlefull");
846 QString
rating = QString::number(pginfo->GetStars(10));
851 if (oldimgfile.isEmpty() || force_preview_reload)
858 pginfo->CalculateProgress(pginfo->QueryLastPlayPos());
860 pginfo->ToMap(infoMap);
894 if (arthost.isEmpty())
901 pginfo->GetInetRef(), pginfo->GetSeason(),
923 if (item->
GetText(
"is_item_initialized").isNull())
925 QMap<AudioProps, QString> audioFlags;
926 audioFlags[AUD_DOLBY] =
"dolby";
927 audioFlags[AUD_SURROUND] =
"surround";
928 audioFlags[AUD_STEREO] =
"stereo";
929 audioFlags[AUD_MONO] =
"mono";
931 QMap<VideoProps, QString> codecFlags;
932 codecFlags[VID_MPEG2] =
"mpeg2";
933 codecFlags[VID_AVC] =
"avc";
934 codecFlags[VID_HEVC] =
"hevc";
936 QMap<SubtitleProps, QString> subtitleFlags;
937 subtitleFlags[SUB_SIGNED] =
"deafsigned";
938 subtitleFlags[SUB_ONSCREEN] =
"onscreensub";
939 subtitleFlags[SUB_NORMAL] =
"subtitles";
940 subtitleFlags[SUB_HARDHEAR] =
"cc";
950 pginfo->ToMap(infoMap);
955 if (groupname == pginfo->GetTitle().toLower())
957 item->
SetText(tempSubTitle,
"titlesubtitle");
961 "titlesubtitlefull");
966 item->
DisplayState(QString::number(pginfo->GetStars(10)),
971 QMap<AudioProps, QString>::iterator ait;
972 for (ait = audioFlags.begin(); ait != audioFlags.end(); ++ait)
974 if (pginfo->GetAudioProperties() & ait.key())
978 uint props = pginfo->GetVideoProperties();
980 QMap<VideoProps, QString>::iterator cit;
981 for (cit = codecFlags.begin(); cit != codecFlags.end(); ++cit)
983 if (props & cit.key())
990 if (props & VID_PROGRESSIVE)
995 if (props & VID_1080)
1002 if (props & VID_1080)
1005 if (props & VID_720)
1007 if (!(props & (VID_4K | VID_1080 | VID_720)))
1009 if (props & VID_HDTV)
1011 else if (props & VID_WIDESCREEN)
1017 QMap<SubtitleProps, QString>::iterator sit;
1018 for (sit = subtitleFlags.begin(); sit != subtitleFlags.end(); ++sit)
1020 if (pginfo->GetSubtitleType() & sit.key())
1024 item->
DisplayState(pginfo->GetCategoryTypeString(),
"categorytype");
1027 item->
SetText(
"yes",
"is_item_initialized");
1044 const auto watchedPercent = pginfo->GetWatchedPercent();
1046 item->
SetProgress1(0, showProgress ? 100 : 0, watchedPercent);
1047 item->
SetProgress2(0, 100, pginfo->GetRecordedPercent());
1054 if (token.isEmpty())
1061 (
asAvailable == sel_pginfo->GetAvailableStatus()))
1077 if (list.size() < 5)
1079 LOG(VB_GENERAL, LOG_ERR,
"HandlePreviewEvent() -- too few args");
1080 for (
uint i = 0; i < (
uint) list.size(); i++)
1082 LOG(VB_GENERAL, LOG_INFO, QString(
"%1: %2")
1083 .arg(i).arg(list[i]));
1088 uint recordingID = list[0].toUInt();
1089 const QString& previewFile = list[1];
1090 const QString& message = list[2];
1093 for (
uint i = 4; i < (
uint) list.size(); i++)
1095 const QString& token = list[i];
1106 QString tokens(
"\n\t\t\ttokens: ");
1107 for (
uint i = 4; i < (
uint) list.size(); i++)
1108 tokens += list[i] +
", ";
1109 LOG(VB_GENERAL, LOG_DEBUG,
LOC +
1110 "Ignoring PREVIEW_SUCCESS, no matcing token" + tokens);
1114 if (previewFile.isEmpty())
1116 LOG(VB_GENERAL, LOG_ERR,
LOC +
1117 "Ignoring PREVIEW_SUCCESS, no preview file.");
1129 LOG(VB_GENERAL, LOG_DEBUG,
LOC +
1130 "Ignoring PREVIEW_SUCCESS, item no longer on screen.");
1135 LOG(VB_GUI, LOG_INFO,
LOC + QString(
"Loading preview %1,\n\t\t\tmsg %2")
1136 .arg(previewFile, message));
1138 item->
SetImage(previewFile,
"preview",
true);
1152 uint32_t flags = FL_NONE;
1157 QMap <QString, int>::iterator it;
1160 iconMap[
"commflagged"] = FL_COMMFLAG;
1161 iconMap[
"cutlist"] = FL_CUTLIST;
1162 iconMap[
"autoexpire"] = FL_AUTOEXP;
1163 iconMap[
"processing"] = FL_COMMPROCESSING;
1164 iconMap[
"editing"] = FL_EDITING;
1165 iconMap[
"bookmark"] = FL_BOOKMARK;
1166 iconMap[
"inuse"] = (FL_INUSERECORDING |
1169 iconMap[
"transcoded"] = FL_TRANSCODED;
1170 iconMap[
"watched"] = FL_WATCHED;
1171 iconMap[
"preserved"] = FL_PRESERVED;
1179 iconImage->
SetVisible((flags & (*it)) != 0U);
1193 iconMap[
"1dolby"] = AUD_DOLBY;
1194 iconMap[
"2surround"] = AUD_SURROUND;
1195 iconMap[
"3stereo"] = AUD_STEREO;
1199 bool haveIcon =
false;
1200 if (pginfo && iconState)
1215 if (iconState && !haveIcon)
1219 if (pginfo && iconState)
1225 if (props & VID_PROGRESSIVE)
1228 iconMap[
"hd1080p"] = VID_1080;
1233 iconMap[
"hd1080i"] = VID_1080;
1238 iconMap[
"widescreen"] = VID_WIDESCREEN;
1257 iconMap[
"damaged"] = VID_DAMAGED;
1261 if (pginfo && iconState)
1276 if (iconState && !haveIcon)
1279 iconMap[
"deafsigned"] = SUB_SIGNED;
1280 iconMap[
"onscreensub"] = SUB_ONSCREEN;
1281 iconMap[
"subtitles"] = SUB_NORMAL;
1286 if (pginfo && iconState)
1301 if (iconState && !haveIcon)
1326 if (!freereportText && !usedProgress && !
GetChild(
"diskspacetotal") &&
1336 usageMap[
"diskspacetotal"] = locale.toString((freeSpaceTotal / 1024.0),
1338 usageMap[
"diskspaceused"] = locale.toString((freeSpaceUsed / 1024.0),
1340 usageMap[
"diskspacefree"] = locale.toString(
1341 ((freeSpaceTotal - freeSpaceUsed) / 1024.0),
1345 if (freeSpaceTotal > 0.0)
1346 perc = (100.0 * freeSpaceUsed) / freeSpaceTotal;
1348 usageMap[
"diskspacepercentused"] = QString::number((
int)perc);
1349 usageMap[
"diskspacepercentfree"] = QString::number(100 - (
int)perc);
1351 QString size = locale.toString(((freeSpaceTotal - freeSpaceUsed) / 1024.0),
1354 QString usestr = tr(
"%1% used, %2 GB free",
"Diskspace")
1355 .arg(QString::number((
int)perc),
1359 freereportText->
SetText(usestr);
1363 usedProgress->
SetTotal((
int)freeSpaceTotal);
1364 usedProgress->
SetUsed((
int)freeSpaceUsed);
1387 QString key = (*it);
1388 QString
tmp = (key ==
"All Programs") ?
"All" : key;
1395 QVariant::fromValue(key));
1399 item->SetText(name);
1409 int best_pref = INT_MAX;
1411 QStringList::iterator it;
1414 QString groupname = (*it);
1417 QVariant::fromValue(groupname.toLower()));
1419 int pref = groupPreferences.indexOf(groupname.toLower());
1420 if ((pref >= 0) && (pref < best_pref))
1427 QString displayName = groupname;
1428 if (displayName.isEmpty())
1437 item->SetText(groupname,
"groupname");
1438 item->SetText(displayName,
"name");
1439 item->SetText(displayName);
1441 int count =
m_progLists[groupname.toLower()].size();
1442 item->SetText(QString::number(count),
"reccount");
1457 QString newRecGroup = sel_item->
GetData().toString();
1473 if (!nextGroup.isEmpty())
1482 QString groupname = sel_item->
GetData().toString();
1483 QString grouplabel = sel_item->
GetText();
1498 ProgramMap::iterator pmit =
m_progLists.find(groupname);
1504 for (
auto & prog : progList)
1507 prog->GetAvailableStatus() ==
asDeleted)
1516 if (!progList.empty())
1521 tr(
"There are no recordings available") :
1522 tr(
"There are no recordings in your current view");
1531 QStringList &groupSelPref, QStringList &itemSelPref,
1532 QStringList &itemTopPref)
1538 groupSelPref.push_back(prefSelGroup->
GetData().toString());
1540 i < groupList->GetCount(); i++)
1544 groupSelPref.push_back(prefSelGroup->
GetData().toString());
1548 for (
int i = curPos; (i >= 0) && (i < recordingList->GetCount()); i++)
1552 itemSelPref.push_back(groupSelPref.front());
1553 itemSelPref.push_back(QString::number(pginfo->GetRecordingID()));
1555 for (
int i = curPos; (i >= 0) && (i < recordingList->GetCount()); i--)
1559 itemSelPref.push_back(groupSelPref.front());
1560 itemSelPref.push_back(QString::number(pginfo->GetRecordingID()));
1564 for (
int i = topPos + 1; i >= topPos - 1; i--)
1566 if (i >= 0 && i < recordingList->GetCount())
1572 itemTopPref.push_front(QString::number(pginfo->GetRecordingID()));
1573 itemTopPref.push_front(groupSelPref.front());
1577 itemTopPref.push_back(groupSelPref.front());
1578 itemTopPref.push_back(QString::number(pginfo->GetRecordingID()));
1588 const QStringList &groupSelPref,
const QStringList &itemSelPref,
1589 const QStringList &itemTopPref)
1594 if (!prefSelGroup ||
1595 !groupSelPref.contains(prefSelGroup->
GetData().toString()) ||
1596 !itemSelPref.contains(prefSelGroup->
GetData().toString()))
1602 QString groupname = prefSelGroup->
GetData().toString();
1606 for (
uint i = 0; i+1 < (
uint)itemSelPref.size(); i+=2)
1608 if (itemSelPref[i] != groupname)
1611 uint recordingID = itemSelPref[i+1].toUInt();
1616 if (pginfo && (pginfo->GetRecordingID() == recordingID))
1619 i = itemSelPref.size();
1627 for (
uint i = 0; i+1 < (
uint)itemTopPref.size(); i+=2)
1629 if (itemTopPref[i] != groupname)
1632 uint recordingID = itemTopPref[i+1].toUInt();
1637 if (pginfo && (pginfo->GetRecordingID() == recordingID))
1640 i = itemTopPref.size();
1649 LOG(VB_GENERAL, LOG_DEBUG, QString(
"Reselect success (%1,%2)")
1650 .arg(sel).arg(top));
1657 LOG(VB_GENERAL, LOG_DEBUG, QString(
"Reselect failure (%1,%2)")
1658 .arg(sel).arg(top));
1668 QStringList groupSelPref;
1669 QStringList itemSelPref;
1670 QStringList itemTopPref;
1672 groupSelPref, itemSelPref, itemTopPref))
1681 QMap<uint, AvailableStatusType> asCache;
1687 uint asRecordingID = prog->GetRecordingID();
1688 asCache[asRecordingID] = prog->GetAvailableStatus();
1707 bool isAllProgsGroup = (
m_recGroup ==
"All Programs");
1708 QMap<QString, QString> sortedList;
1709 QMap<int, QString> searchRule;
1710 QMap<int, QDateTime> recidLastEventTime;
1711 QMap<int, ProgramInfo*> recidWatchListProgram;
1722 query.
prepare(
"SELECT recordid,title FROM record "
1723 "WHERE search > 0 AND search != :MANUAL;");
1728 while (query.
next())
1730 QString tmpTitle = query.
value(1).toString();
1732 searchRule[query.
value(0).toInt()] = tmpTitle;
1738 bool isUnknownCategory = (
m_recGroup == tr(
"Unknown"));
1739 bool isDeletedGroup = (
m_recGroup ==
"Deleted");
1740 bool isLiveTvGroup = (
m_recGroup ==
"LiveTV");
1742 std::vector<ProgramInfo*> list;
1745 for (
auto *
p : list)
1747 if (
p->IsDeletePending())
1752 const QString& pRecgroup(
p->GetRecordingGroup());
1753 const bool isLiveTVProg(pRecgroup ==
"LiveTV");
1760 if (pRecgroup ==
"Deleted")
1764 if (!isDeletedGroup)
1769 !isLiveTvGroup && isLiveTVProg)
1778 else if (isCategoryFilter)
1781 if (isUnknownCategory ? !
p->GetCategory().isEmpty()
1786 else if (!isAllProgsGroup && pRecgroup !=
m_recGroup)
1789 if (
p->GetTitle().isEmpty())
1790 p->SetTitle(tr(
"_NO_TITLE_"));
1797 uint asRecordingID =
p->GetRecordingID();
1798 if (asCache.contains(asRecordingID))
1799 p->SetAvailableStatus(asCache[asRecordingID],
"UpdateUILists");
1805 QString tmpTitle = tr(
"Live TV");
1806 sortedList[tmpTitle.toLower()] = tmpTitle;
1808 m_progLists[tmpTitle.toLower()].setAutoDelete(
false);
1816 p->GetTitle(),
p->GetSortTitle(),
m_viewMask, titleSort,
1817 p->GetRecordingPriority());
1818 sTitle = sTitle.toLower();
1820 if (!sortedList.contains(sTitle))
1821 sortedList[sTitle] =
p->GetTitle();
1822 m_progLists[sortedList[sTitle].toLower()].push_front(
p);
1823 m_progLists[sortedList[sTitle].toLower()].setAutoDelete(
false);
1828 !pRecgroup.isEmpty() && !isLiveTVProg)
1830 sortedList[pRecgroup.toLower()] = pRecgroup;
1832 m_progLists[pRecgroup.toLower()].setAutoDelete(
false);
1838 QString catl =
p->GetCategory().toLower();
1839 sortedList[catl] =
p->GetCategory();
1845 !searchRule[
p->GetRecordingRuleID()].isEmpty() &&
1846 p->GetTitle() != searchRule[
p->GetRecordingRuleID()])
1848 QString tmpTitle = QString(
"(%1)")
1849 .arg(searchRule[
p->GetRecordingRuleID()]);
1850 sortedList[tmpTitle.toLower()] = tmpTitle;
1852 m_progLists[tmpTitle.toLower()].setAutoDelete(
false);
1856 !isLiveTVProg && pRecgroup !=
"Deleted")
1858 int rid =
p->GetRecordingRuleID();
1859 auto letIt = recidLastEventTime.find(rid);
1860 if (letIt == recidLastEventTime.end() || *letIt < p->GetLastModifiedTime())
1862 recidLastEventTime[rid] =
p->GetLastModifiedTime();
1868 LOG(VB_FILE, LOG_INFO, QString(
"Auto-expire off: %1")
1869 .arg(
p->GetTitle()));
1871 else if (
p->IsWatched())
1874 LOG(VB_FILE, LOG_INFO,
1875 QString(
"Marked as 'watched': %1")
1876 .arg(
p->GetTitle()));
1880 auto wlpIt = recidWatchListProgram.find(rid);
1881 if (wlpIt == recidWatchListProgram.end())
1883 recidWatchListProgram[rid] =
p;
1887 (*wlpIt)->SetRecordingPriority2(
wlEarlier);
1888 LOG(VB_FILE, LOG_INFO,
1889 QString(
"Not the earliest: %1")
1890 .arg((*wlpIt)->GetTitle()));
1892 recidWatchListProgram[rid] =
p;
1897 LOG(VB_FILE, LOG_INFO,
1898 QString(
"Not the earliest: %1")
1899 .arg(
p->GetTitle()));
1907 for (
auto *
p : std::as_const(recidWatchListProgram))
1916 if (sortedList.empty())
1918 LOG(VB_GENERAL, LOG_WARNING,
LOC +
"SortedList is Empty");
1922 if (!isAllProgsGroup)
1934 if (episodeSort ==
"OrigAirDate")
1936 QMap<QString, ProgramList>::Iterator Iprog;
1939 if (!Iprog.key().isEmpty())
1941 std::stable_sort((*Iprog).begin(), (*Iprog).end(),
1948 else if (episodeSort ==
"Id")
1950 QMap<QString, ProgramList>::Iterator Iprog;
1953 if (!Iprog.key().isEmpty())
1955 std::stable_sort((*Iprog).begin(), (*Iprog).end(),
1962 else if (episodeSort ==
"Date")
1964 QMap<QString, ProgramList>::iterator it;
1967 if (!it.key().isEmpty())
1969 std::stable_sort((*it).begin(), (*it).end(),
1976 else if (episodeSort ==
"Season")
1978 QMap<QString, ProgramList>::iterator it;
1981 if (!it.key().isEmpty())
1983 std::stable_sort((*it).begin(), (*it).end(),
1994 query.
prepare(
"SELECT recordid, last_delete FROM record;");
1998 while (query.
next())
2000 int recid = query.
value(0).toInt();
2002 QDateTime last_delete =
2005 if (last_delete.isValid())
2007 auto it = recidLastEventTime.find(recid);
2008 if (it != recidLastEventTime.end() && last_delete > *it)
2010 recidLastEventTime[recid] = last_delete;
2019 int recid = (*pit)->GetRecordingRuleID();
2021 (*pit)->SetRecordingPriority2(recidLastEventTime[recid].toSecsSinceEpoch()/60);
2023 LOG(VB_FILE, LOG_INFO, QString(
" %1 %2 %3")
2026 .arg((*pit)->GetRecordingPriority2())
2027 .arg((*pit)->GetTitle()));
2041 (
std::find(sortedList.cbegin(), sortedList.cend(), tr(
"Live TV"))
2042 == sortedList.cend()))
2058 query.
prepare(
"SELECT distinct recgroup from recorded WHERE "
2059 "deletepending = 0 ORDER BY recgroup");
2063 while (query.
next())
2065 name = query.
value(0).toString();
2066 if (name !=
"Deleted" && name !=
"LiveTV" && !name.startsWith(
'.'))
2095 groupSelPref, itemSelPref, itemTopPref);
2108 while (!
tmp.isEmpty())
2120 QCoreApplication::postEvent(
2134 const bool ignoreBookmark =
false;
2135 const bool ignoreProgStart =
false;
2136 const bool ignoreLastPlayPos =
false;
2137 const bool underNetworkControl =
false;
2139 PlayX(*pginfo, ignoreBookmark, ignoreProgStart, ignoreLastPlayPos,
2140 underNetworkControl);
2153 const bool ignoreBookmark =
false;
2154 const bool ignoreProgStart =
true;
2155 const bool ignoreLastPlayPos =
true;
2156 const bool underNetworkControl =
false;
2158 PlayX(*pginfo, ignoreBookmark, ignoreProgStart, ignoreLastPlayPos,
2159 underNetworkControl);
2172 const bool ignoreBookmark =
true;
2173 const bool ignoreProgStart =
true;
2174 const bool ignoreLastPlayPos =
true;
2175 const bool underNetworkControl =
false;
2177 PlayX(*pginfo, ignoreBookmark, ignoreProgStart, ignoreLastPlayPos,
2178 underNetworkControl);
2191 const bool ignoreBookmark =
true;
2192 const bool ignoreProgStart =
true;
2193 const bool ignoreLastPlayPos =
false;
2194 const bool underNetworkControl =
false;
2196 PlayX(*pginfo, ignoreBookmark, ignoreProgStart, ignoreLastPlayPos,
2197 underNetworkControl);
2201 bool ignoreBookmark,
2202 bool ignoreProgStart,
2203 bool ignoreLastPlayPos,
2204 bool underNetworkControl)
2208 Play(pginfo,
false, ignoreBookmark, ignoreProgStart, ignoreLastPlayPos, underNetworkControl);
2255 LOG(VB_GENERAL, LOG_ERR, QString(
"deleteSelected(%1) -- failed ")
2257 QString(
"availability status: %1 ")
2258 .arg(pginfo->GetAvailableStatus()));
2261 tr(
"This recording is already being deleted"));
2263 else if (!pginfo->QueryIsDeleteCandidate())
2266 pginfo->QueryIsInUse(byWho);
2268 LOG(VB_GENERAL, LOG_ERR, QString(
"deleteSelected(%1) -- failed ")
2270 QString(
"delete candidate: %1 in use by %2")
2271 .arg(pginfo->QueryIsDeleteCandidate()).arg(byWho));
2273 if (byWho.isEmpty())
2276 tr(
"This recording is already being deleted"));
2281 tr(
"This recording is currently in use by:") +
"\n" +
2329 if (which ==
"groupmenu")
2349 else if (which ==
"actionmenu")
2361 QString label = tr(
"Group List Menu");
2402 bool inPlaylist,
bool ignoreBookmark,
bool ignoreProgStart,
2403 bool ignoreLastPlayPos,
bool underNetworkControl)
2405 bool playCompleted =
false;
2433 ignoreProgStart =
true;
2449 QCoreApplication::postEvent(
2456 return playCompleted;
2460 bool forceMetadataDelete)
2467 if (!forceMetadataDelete &&
2477 if (!forceMetadataDelete)
2482 forceMetadataDelete, forgetHistory);
2512 label = tr(
"Are you sure you want to delete:");
break;
2514 label = tr(
"Recording file does not exist.\n"
2515 "Are you sure you want to delete:");
2518 label = tr(
"Are you sure you want to stop:");
break;
2573 tr(
"Yes, delete it and the remaining %1 list items")
2582 nullptr, !defaultIsYes);
2586 nullptr, !defaultIsYes);
2593 tr(
"No, and keep the remaining %1 list items")
2594 .arg(other_delete_cnt),
2614 tr(
"This recording is currently in "
2615 "use by:") +
"\n" + byWho);
2621 tr(
"This recording is currently "
2628 tr(
"This recording is currently being "
2629 "deleted and is unavailable"));
2634 tr(
"This recording has been "
2635 "deleted and is unavailable"));
2640 tr(
"The file for this recording can "
2646 tr(
"The file for this recording is "
2652 tr(
"This recording is not yet "
2659 QString label = tr(
"There is %n item(s) in the playlist. Actions affect "
2660 "all items in the playlist",
"",
m_playList.size());
2672 menu->AddItem(tr(
"Toggle playlist for this Category/Title"),
2677 menu->AddItem(tr(
"Toggle playlist for this Group"),
2682 menu->AddItem(tr(
"Toggle playlist for this recording"),
2688 menu->AddItem(tr(
"Delete, and allow re-record"),
2696 QString label = tr(
"There is %n item(s) in the playlist. Actions affect "
2697 "all items in the playlist",
"",
m_playList.size());
2714 QString label = tr(
"There is %n item(s) in the playlist. Actions affect "
2715 "all items in the playlist",
"",
m_playList.size());
2721 QList<uint>::Iterator it;
2722 bool isTranscoding =
true;
2723 bool isFlagging =
true;
2724 bool isMetadataLookup =
true;
2725 bool isRunningUserJob1 =
true;
2726 bool isRunningUserJob2 =
true;
2727 bool isRunningUserJob3 =
true;
2728 bool isRunningUserJob4 =
true;
2738 isTranscoding =
false;
2746 isMetadataLookup =
false;
2750 isRunningUserJob1 =
false;
2754 isRunningUserJob2 =
false;
2758 isRunningUserJob3 =
false;
2762 isRunningUserJob4 =
false;
2763 if (!isTranscoding && !isFlagging && !isRunningUserJob1 &&
2764 !isRunningUserJob2 && !isRunningUserJob3 && !isRunningUserJob4)
2779 if (!isMetadataLookup)
2785 if (!command.isEmpty())
2789 if (!isRunningUserJob1)
2791 menu->AddItem(tr(
"Begin") +
' ' + jobTitle,
2796 menu->AddItem(tr(
"Stop") +
' ' + jobTitle,
2802 if (!command.isEmpty())
2806 if (!isRunningUserJob2)
2808 menu->AddItem(tr(
"Begin") +
' ' + jobTitle,
2813 menu->AddItem(tr(
"Stop") +
' ' + jobTitle,
2819 if (!command.isEmpty())
2823 if (!isRunningUserJob3)
2825 menu->AddItem(tr(
"Begin") +
' ' + jobTitle,
2830 menu->AddItem(tr(
"Stop") +
' ' + jobTitle,
2836 if (!command.isEmpty())
2840 if (!isRunningUserJob4)
2842 menu->AddItem(QString(
"%1 %2").arg(tr(
"Begin"), jobTitle),
2847 menu->AddItem(QString(
"%1 %2").arg(tr(
"Stop"), jobTitle),
2914 menu->AddItem(tr(
"Play from last played position"),
2917 menu->AddItem(tr(
"Play from bookmark"),
2919 menu->AddItem(tr(
"Play from beginning"),
2922 menu->AddItem(tr(
"Clear last played position"),
2938 tr(
"Disable Auto Expire") : tr(
"Enable Auto Expire");
2940 tr(
"Do not preserve this episode") : tr(
"Preserve this episode");
2961 menu->AddItem(tr(
"Edit Recording Schedule"),
2975 static const std::array<const int,kMaxJobs>
kJobs
3006 const std::array<const bool,kMaxJobs> add
3016 const std::array<const QString,kMaxJobs*2> desc
3019 tr(
"Stop Transcoding"), tr(
"Begin Transcoding"),
3020 tr(
"Stop Commercial Detection"), tr(
"Begin Commercial Detection"),
3021 tr(
"Stop Metadata Lookup"), tr(
"Begin Metadata Lookup"),
3028 for (
size_t i = 0; i <
kMaxJobs; i++)
3033 QString stop_desc = desc[i*2+0];
3034 QString start_desc = desc[i*2+1];
3036 if (start_desc.toUInt())
3039 "UserJobDesc"+start_desc, tr(
"User Job") +
" #" + start_desc);
3040 stop_desc = tr(
"Stop") +
' ' + jobTitle;
3041 start_desc = tr(
"Begin") +
' ' + jobTitle;
3049 menu->AddItem((running) ? stop_desc : start_desc,
3050 kMySlots[i * 2 + (running ? 0 : 1)], submenu);
3058 QString label = tr(
"Transcoding profiles");
3062 menu->AddItemV(tr(
"Default"), QVariant::fromValue(-1));
3063 menu->AddItemV(tr(
"Autodetect"), QVariant::fromValue(0));
3066 query.
prepare(
"SELECT r.name, r.id "
3067 "FROM recordingprofiles r, profilegroups p "
3068 "WHERE p.name = 'Transcoders' "
3069 "AND r.profilegroup = p.id "
3070 "AND r.name != 'RTjpeg/MPEG4' "
3071 "AND r.name != 'MPEG2' ");
3079 while (query.
next())
3081 QString transcoder_name = query.
value(0).toString();
3082 int transcoder_id = query.
value(1).toInt();
3085 if (transcoder_name ==
"High Quality")
3086 transcoder_name = tr(
"High Quality");
3087 else if (transcoder_name ==
"Medium Quality")
3088 transcoder_name = tr(
"Medium Quality");
3089 else if (transcoder_name ==
"Low Quality")
3090 transcoder_name = tr(
"Low Quality");
3092 menu->AddItemV(transcoder_name, QVariant::fromValue(transcoder_id));
3117 tr(
"Recording file cannot be found") :
3119 tr(
"Recording file contains no data") :
3120 tr(
"Recording Options");
3162 bool sameProgram =
false;
3249 QString timedate = QString(
"%1 - %2")
3263 return QString(
"\n%1%2\n%3").arg(title, extra, timedate);
3268 QList<uint>::Iterator it;
3326 QList<uint>::Iterator it;
3331 if (pginfo !=
nullptr)
3402 "",
"", jobHost, jobFlags);
3409 QList<uint>::Iterator it;
3444 QString forceDeleteStr(
"0");
3454 list.push_back(forceDeleteStr);
3455 list.push_back(forgetHistory ?
"1" :
"0");
3476 uint recordingID = 0;
3483 uint recordingID = 0;
3499 QCoreApplication::postEvent(
this, e);
3507 QString title = pginfo->
GetTitle().toLower();
3539 const QString& recgroup)
3542 std::array<ProgramList::iterator,2> _it {
3544 std::array<ProgramList::iterator,2> _end {
3547 if (recgroup !=
"LiveTV")
3549 swap( _it[0], _it[1]);
3550 swap(_end[0], _end[1]);
3553 for (
uint i = 0; i < 2; i++)
3557 for (; it != end; ++it)
3559 if ((*it)->GetRecordingID() == recordingID)
3582 pginfo->SaveWatched(on);
3623 pginfo->SavePreserve(on);
3642 for (
auto *pl : std::as_const(
m_progLists[groupname]))
3644 if (pl && (pl->GetAvailableStatus() ==
asAvailable))
3718 QStringList tokens = command.simplified().split(
" ");
3720 if (tokens.size() >= 4 && (tokens[1] ==
"PLAY" || tokens[1] ==
"RESUME"))
3722 if (tokens.size() == 6 && tokens[2] ==
"PROGRAM")
3724 int clientID = tokens[5].toInt();
3726 LOG(VB_GENERAL, LOG_INFO,
LOC +
3727 QString(
"NetworkControl: Trying to %1 program '%2' @ '%3'")
3728 .arg(tokens[1], tokens[3], tokens[4]));
3732 LOG(VB_GENERAL, LOG_ERR,
LOC +
3733 "NetworkControl: Already playing");
3735 QString msg = QString(
3736 "NETWORK_CONTROL RESPONSE %1 ERROR: Unable to play, "
3737 "player is already playing another recording.")
3745 uint chanid = tokens[3].toUInt();
3751 QString msg = QString(
"NETWORK_CONTROL RESPONSE %1 OK")
3758 const bool ignoreBookmark = (tokens[1] ==
"PLAY");
3759 const bool ignoreProgStart =
true;
3760 const bool ignoreLastPlayPos =
true;
3761 const bool underNetworkControl =
true;
3762 PlayX(pginfo, ignoreBookmark, ignoreProgStart,
3763 ignoreLastPlayPos, underNetworkControl);
3767 QString message = QString(
"NETWORK_CONTROL RESPONSE %1 "
3768 "ERROR: Could not find recording for "
3770 .arg(tokens[5], tokens[3], tokens[4]);
3781 if ((event->key() == Qt::Key_LaunchMedia) &&
3782 (event->modifiers() ==
3783 (Qt::ShiftModifier |
3784 Qt::ControlModifier |
3787 Qt::KeypadModifier)))
3801 QStringList actions;
3805 for (
int i = 0; i < actions.size() && !handled; ++i)
3807 QString
action = actions[i];
3812 else if (
action ==
"MENU")
3816 else if (
action ==
"NEXTFAV")
3823 else if (
action ==
"TOGGLEFAV")
3849 if (!nextGroup.isEmpty())
3852 else if (
action ==
"NEXTVIEW")
3859 else if (
action ==
"PREVVIEW")
3874 else if (
action ==
"CHANGERECGROUP")
3876 else if (
action ==
"CHANGEGROUPVIEW")
3878 else if (
action ==
"EDIT")
3888 else if (
action ==
"CUSTOMEDIT")
3890 else if (
action ==
"GUIDE")
3892 else if (
action ==
"UPCOMING")
3919 QString resultid = dce->
GetId();
3921 if (resultid ==
"transcode" && dce->GetResult() >= 0)
3926 auto *me =
dynamic_cast<MythEvent *
>(event);
3930 const QString& message = me->
Message();
3932 if (message.startsWith(
"RECORDING_LIST_CHANGE"))
3934 QStringList tokens = message.simplified().split(
" ");
3935 uint recordingID = 0;
3936 if (tokens.size() >= 3)
3937 recordingID = tokens[2].toUInt();
3939 if ((tokens.size() >= 2) && tokens[1] ==
"UPDATE")
3949 else if (recordingID && (tokens[1] ==
"ADD"))
3958 else if (recordingID && (tokens[1] ==
"DELETE"))
3967 else if (message.startsWith(
"NETWORK_CONTROL"))
3969 QStringList tokens = message.simplified().split(
" ");
3970 if ((tokens[1] !=
"ANSWER") && (tokens[1] !=
"RESPONSE"))
3977 Qt::KeyboardModifiers modifiers =
3979 Qt::ControlModifier |
3983 auto *keyevent =
new QKeyEvent(QEvent::KeyPress,
3984 Qt::Key_LaunchMedia, modifiers);
3987 keyevent =
new QKeyEvent(QEvent::KeyRelease,
3988 Qt::Key_LaunchMedia, modifiers);
3992 else if (message.startsWith(
"UPDATE_FILE_SIZE"))
3994 QStringList tokens = message.simplified().split(
" ");
3995 if (tokens.size() >= 3)
3998 uint recordingID = tokens[1].toUInt();
3999 uint64_t filesize = tokens[2].toLongLong(&ok);
4005 recordingID, filesize,
4010 else if (message ==
"UPDATE_UI_LIST")
4020 else if (message.startsWith(
"UPDATE_UI_ITEM"))
4022 QStringList tokens = message.simplified().split(
" ");
4023 if (tokens.size() < 3)
4026 uint recordingID = tokens[1].toUInt();
4032 else if (message ==
"UPDATE_USAGE_UI")
4036 else if (message ==
"RECONNECT_SUCCESS")
4040 else if (message ==
"LOCAL_PBB_DELETE_RECORDINGS")
4043 for (
uint i = 0; i+2 < (
uint)me->ExtraDataList().size(); i+=3)
4045 uint recordingID = me->ExtraDataList()[i+0].toUInt();
4051 LOG(VB_GENERAL, LOG_WARNING,
LOC +
4052 QString(
"LOCAL_PBB_DELETE_RECORDINGS - "
4053 "No matching recording %1")
4058 QString forceDeleteStr = me->ExtraDataList()[i+1];
4059 QString forgetHistoryStr = me->ExtraDataList()[i+2];
4062 list.push_back(forceDeleteStr);
4063 list.push_back(forgetHistoryStr);
4065 "LOCAL_PBB_DELETE_RECORDINGS");
4077 else if (message ==
"DELETE_SUCCESSES")
4081 else if (message ==
"DELETE_FAILURES")
4083 if (me->ExtraDataList().size() < 3)
4086 for (
uint i = 0; i+2 < (
uint)me->ExtraDataList().size(); i += 3)
4089 me->ExtraDataList()[i+0].toUInt());
4097 bool forceDelete = me->ExtraDataList()[1].toUInt() != 0U;
4106 LOG(VB_GENERAL, LOG_WARNING,
LOC +
4107 "Delete failures not handled due to "
4108 "pre-existing popup.");
4115 else if (message ==
"PREVIEW_SUCCESS")
4119 else if (message ==
"PREVIEW_FAILED" && me->ExtraDataCount() >= 5)
4121 for (
uint i = 4; i < (
uint) me->ExtraDataCount(); i++)
4123 const QString& token = me->ExtraData(i);
4129 else if (message ==
"AVAILABILITY" && me->ExtraDataCount() == 8)
4131 static constexpr std::chrono::milliseconds kMaxUIWaitTime = 10s;
4132 QStringList list = me->ExtraDataList();
4133 uint recordingID = list[0].toUInt();
4136 uint64_t fs = list[3].toULongLong();
4138 tm.setHMS(list[4].toUInt(), list[5].toUInt(),
4139 list[6].toUInt(), list[7].toUInt());
4140 QTime now = QTime::currentTime();
4141 auto time_elapsed = std::chrono::milliseconds(tm.msecsTo(now));
4142 if (time_elapsed < 0ms)
4143 time_elapsed += 24h;
4154 if (time_elapsed >= kMaxUIWaitTime)
4163 (time_elapsed < kMaxUIWaitTime))
4173 const bool ignoreBookmark =
false;
4174 const bool ignoreProgStart =
false;
4175 const bool ignoreLastPlayPos =
true;
4176 const bool underNetworkControl =
false;
4178 ignoreBookmark, ignoreProgStart, ignoreLastPlayPos,
4179 underNetworkControl);
4187 QCoreApplication::postEvent(
4191 if (old_avail != availableStatus)
4194 else if ((message ==
"PLAY_PLAYLIST") && !
m_playListPlay.empty())
4208 const bool ignoreBookmark =
false;
4209 const bool ignoreProgStart =
true;
4210 const bool ignoreLastPlayPos =
true;
4211 const bool underNetworkControl =
false;
4213 Play(*pginfo,
true, ignoreBookmark, ignoreProgStart,
4214 ignoreLastPlayPos, underNetworkControl);
4216 else if ((message ==
"SET_PLAYBACK_URL") && (me->ExtraDataCount() == 2))
4218 uint recordingID = me->ExtraData(0).toUInt();
4223 else if ((message ==
"FOUND_ARTWORK") && (me->ExtraDataCount() >= 5))
4226 uint recordingID = me->ExtraData(3).toUInt();
4227 const QString& group = me->ExtraData(4);
4228 const QString& fn = me->ExtraData(5);
4242 else if (!group.isEmpty() &&
4252 else if (message ==
"EXIT_TO_MENU" ||
4253 message ==
"CANCEL_PLAYLIST")
4266 LOG(VB_GENERAL, LOG_WARNING,
LOC +
4267 QString(
"Failed to remove %1, reloading list")
4276 groupname = sel_item->
GetData().toString();
4281 auto pit = (*git).begin();
4282 while (pit != (*git).end())
4284 if ((*pit)->GetRecordingID() == recordingID)
4286 if (!git.key().isEmpty() && git.key() == groupname)
4290 QVariant::fromValue(*pit));
4294 if (item_cur && (item_by_data == item_cur))
4304 pit = (*git).erase(pit);
4314 if (!groupname.isEmpty() && (git.key() == groupname))
4323 sel_item = next_item;
4326 groupname = sel_item->
GetData().toString();
4355 if (pginfo ==
nullptr)
4365 QCoreApplication::postEvent(
this,
new MythEvent(
"UPDATE_UI_LIST"));
4372 if (helpPopup->Create())
4382 if (viewPopup->Create())
4402 QStringList groupNames;
4403 QStringList displayNames;
4405 QStringList displayGroups;
4411 uint totalItems = 0;
4414 displayNames.append(QString(
"------- %1 -------").arg(tr(
"Groups")));
4415 groupNames.append(
"");
4418 query.
prepare(
"SELECT recgroup, COUNT(title) FROM recorded "
4419 "WHERE deletepending = 0 AND watched <= :WATCHED "
4420 "GROUP BY recgroup");
4424 while (query.
next())
4426 QString dispGroup = query.
value(0).toString();
4430 (dispGroup !=
"Deleted"))
4431 totalItems += items;
4433 groupNames.append(dispGroup);
4435 dispGroup = (dispGroup ==
"Default") ? tr(
"Default") : dispGroup;
4436 dispGroup = (dispGroup ==
"Deleted") ? tr(
"Deleted") : dispGroup;
4437 dispGroup = (dispGroup ==
"LiveTV") ? tr(
"Live TV") : dispGroup;
4439 displayNames.append(tr(
"%1 [%n item(s)]",
nullptr, items).arg(dispGroup));
4446 displayNames.push_front(tr(
"%1 [%n item(s)]",
nullptr, totalItems)
4448 groupNames.push_front(
"All Programs");
4452 query.
prepare(
"SELECT DISTINCT category, COUNT(title) FROM recorded "
4453 "WHERE deletepending = 0 AND watched <= :WATCHED "
4454 "GROUP BY category");
4458 int unknownCount = 0;
4459 while (query.
next())
4462 QString dispGroup = query.
value(0).toString();
4463 if (dispGroup.isEmpty())
4465 unknownCount += items;
4466 dispGroup = tr(
"Unknown");
4468 else if (dispGroup == tr(
"Unknown"))
4469 unknownCount += items;
4472 (dispGroup != tr(
"Unknown")))
4474 displayGroups += tr(
"%1 [%n item(s)]",
nullptr, items).arg(dispGroup);
4475 groups += dispGroup;
4481 if (unknownCount > 0)
4483 QString dispGroup = tr(
"Unknown");
4484 uint items = unknownCount;
4485 displayGroups += tr(
"%1 [%n item(s)]",
nullptr, items).arg(dispGroup);
4486 groups += dispGroup;
4493 displayNames.append(QString(
"------- %1 -------").arg(tr(
"Categories")));
4494 groupNames.append(
"");
4496 displayGroups.sort();
4497 QStringList::iterator it;
4498 for (it = displayGroups.begin(); it != displayGroups.end(); ++it)
4499 displayNames.append(*it);
4500 for (it = groups.begin(); it != groups.end(); ++it)
4501 groupNames.append(*it);
4503 QString label = tr(
"Change Filter");
4508 if (recGroupPopup->Create())
4519 delete recGroupPopup;
4535 QString newRecGroup = recGroup;
4537 if (newRecGroup.isEmpty())
4544 newRecGroup =
"Default";
4546 newRecGroup =
"All Programs";
4548 newRecGroup =
"LiveTV";
4550 newRecGroup =
"Deleted";
4582 query.
prepare(
"SELECT recgroup, password FROM recgroups "
4583 "WHERE password IS NOT NULL AND password <> '';");
4587 while (query.
next())
4589 QString recgroup = query.
value(0).toString();
4592 recgroup =
"Default";
4594 recgroup =
"All Programs";
4596 recgroup =
"LiveTV";
4598 recgroup =
"Deleted";
4624 "SELECT g.recgroup, COUNT(r.title) FROM recgroups g "
4625 "LEFT JOIN recorded r ON g.recgroupid=r.recgroupid AND r.deletepending = 0 "
4626 "WHERE g.recgroupid != 2 AND g.recgroupid != 3 "
4627 "GROUP BY g.recgroupid ORDER BY g.recgroup");
4629 QStringList displayNames(tr(
"Add New"));
4630 QStringList groupNames(
"addnewgroup");
4635 while (query.
next())
4637 QString dispGroup = query.
value(0).toString();
4638 groupNames.push_back(dispGroup);
4640 if (dispGroup ==
"Default")
4641 dispGroup = tr(
"Default");
4642 else if (dispGroup ==
"LiveTV")
4643 dispGroup = tr(
"Live TV");
4644 else if (dispGroup ==
"Deleted")
4645 dispGroup = tr(
"Deleted");
4647 displayNames.push_back(tr(
"%1 [%n item(s)]",
"", query.
value(1).toInt())
4651 QString label = tr(
"Select Recording Group") +
4657 if (rgChanger->Create())
4683 QStringList groupNames(tr(
"Default"));
4684 QStringList displayNames(
"Default");
4687 for (
const auto& name : std::as_const(list))
4689 displayNames.push_back(name);
4690 groupNames.push_back(name);
4693 QString label = tr(
"Select Playback Group") +
4699 if (pgChanger->Create())
4711 QList<uint>::Iterator it;
4716 if (tmpItem !=
nullptr)
4728 QList<uint>::Iterator it;
4733 if (tmpItem !=
nullptr)
4751 if (editMetadata->Create())
4758 delete editMetadata;
4762 const QString &newSubtitle,
4763 const QString &newDescription,
4764 const QString &newInetref,
4780 if (groupname == pginfo->GetTitle().toLower() &&
4781 newTitle != pginfo->GetTitle())
4787 QString tempSubTitle = newTitle;
4788 if (!newSubtitle.trimmed().isEmpty())
4789 tempSubTitle = QString(
"%1 - \"%2\"")
4790 .arg(tempSubTitle, newSubtitle);
4796 if (newSeason > 0 || newEpisode > 0)
4800 seasone = QString(
"s%1e%2")
4803 seasonx = QString(
"%1x%2")
4808 item->
SetText(tempSubTitle,
"titlesubtitle");
4809 item->
SetText(newTitle,
"title");
4810 item->
SetText(newSubtitle,
"subtitle");
4811 item->
SetText(newInetref,
"inetref");
4812 item->
SetText(seasonx,
"00x00");
4813 item->
SetText(seasone,
"s00e00");
4814 item->
SetText(season,
"season");
4815 item->
SetText(episode,
"episode");
4816 if (newDescription !=
nullptr)
4817 item->
SetText(newDescription,
"description");
4820 pginfo->SaveInetRef(newInetref);
4821 pginfo->SaveSeasonEpisode(newSeason, newEpisode);
4830 newRecGroup = newRecGroup.simplified();
4832 if (newRecGroup.isEmpty())
4835 if (newRecGroup ==
"addnewgroup")
4841 tr(
"New Recording Group"));
4846 if (newgroup->Create())
4866 if ((
p->GetRecordingGroup() ==
"LiveTV") &&
4867 (newRecGroup !=
"LiveTV"))
4869 p->SaveAutoExpire(defaultAutoExpire);
4871 else if ((
p->GetRecordingGroup() !=
"LiveTV") &&
4872 (newRecGroup ==
"LiveTV"))
4890 if ((
p->GetRecordingGroup() ==
"LiveTV") && (newRecGroup !=
"LiveTV"))
4891 p->SaveAutoExpire(defaultAutoExpire);
4892 else if ((
p->GetRecordingGroup() !=
"LiveTV") && (newRecGroup ==
"LiveTV"))
4905 if (newPlayGroup.isEmpty() || !tmpItem)
4908 if (newPlayGroup == tr(
"Default"))
4909 newPlayGroup =
"Default";
4913 QList<uint>::Iterator it;
4946 if (pwChanger->Create())
4960 query.
prepare(
"UPDATE recgroups SET password = :PASSWD WHERE "
4961 "recgroup = :RECGROUP");
4963 query.
bindValue(
":PASSWD", newPassword);
4969 if (newPassword.isEmpty())
4988 LOG(VB_GENERAL, LOG_ERR,
LOC +
4989 "Theme is missing 'groups' button list.");
4996 for (
int i = 0; i <
m_list.size(); ++i)
4999 QVariant::fromValue(
m_data.at(i)));
5019 if (item->
GetData().toString().isEmpty())
5022 QString group = item->
GetData().toString();
5130 LOG(VB_GENERAL, LOG_ERR,
LOC +
5131 "Window 'passwordchanger' is missing required elements.");
5194 LOG(VB_GENERAL, LOG_ERR,
LOC +
5195 "Window 'editmetadata' is missing required elements.");
5236 QString newRecDescription =
nullptr;
5237 QString newRecInetref =
nullptr;
5238 uint newRecSeason = 0;
5239 uint newRecEpisode = 0;
5246 if (newRecTitle.isEmpty())
5249 emit
result(newRecTitle, newRecSubtitle, newRecDescription,
5250 newRecInetref, newRecSeason, newRecEpisode);
5260 "recording online..."),
5288 lookup->SetSubtype(
type);
5290 lookup->SetAllowGeneric(
true);
5291 lookup->SetHandleImages(
false);
5299 lookup->SetAutomatic(
false);
5348 Qt::QueuedConnection);
5350 if (resultsdialog->Create())
5363 if (!mfsr || !mfsr->m_result)
5381 QString title = tr(
"No match found for this recording. You can "
5382 "try entering a TVDB/TMDB number, season, and "
5383 "episode manually.");
5387 if (okPopup->Create())
5403 LOG(VB_GENERAL, LOG_ERR,
LOC +
5404 "Window 'iconhelp' is missing required elements.");
5410 addItem(
"watched", tr(
"Recording has been watched"));
5411 addItem(
"commflagged", tr(
"Commercials are flagged"));
5412 addItem(
"cutlist", tr(
"An editing cutlist is present"));
5413 addItem(
"autoexpire", tr(
"The program is able to auto-expire"));
5414 addItem(
"processing", tr(
"Commercials are being flagged"));
5415 addItem(
"bookmark", tr(
"A bookmark is set"));
5417 addItem(
"inuse", tr(
"Recording is in use"));
5418 addItem(
"transcoded", tr(
"Recording has been transcoded"));
5421 addItem(
"mono", tr(
"Recording is in Mono"));
5422 addItem(
"stereo", tr(
"Recording is in Stereo"));
5423 addItem(
"surround", tr(
"Recording is in Surround Sound"));
5424 addItem(
"dolby", tr(
"Recording is in Dolby Surround Sound"));
5426 addItem(
"cc", tr(
"Recording is Closed Captioned"));
5427 addItem(
"subtitles", tr(
"Recording has Subtitles Available"));
5428 addItem(
"onscreensub", tr(
"Recording is Subtitled"));
5430 addItem(
"SD", tr(
"Recording is in Standard Definition"));
5431 addItem(
"widescreen", tr(
"Recording is Widescreen"));
5432 addItem(
"hdtv", tr(
"Recording is in High Definition"));
5433 addItem(
"hd720", tr(
"Recording is in 720p High Definition"));
5434 addItem(
"hd1080i", tr(
"Recording is in 1080i High Definition"));
5435 addItem(
"hd1080p", tr(
"Recording is in 1080p High Definition"));
5436 addItem(
"uhd4Ki", tr(
"Recording is in 4k(interlaced) UHD resolution"));
5437 addItem(
"uhd4Kp", tr(
"Recording is in 4k UHD resolution"));
5438 addItem(
"mpeg2", tr(
"Recording is using MPEG-2 codec"));
5439 addItem(
"avchd", tr(
"Recording is using AVC/H.264 codec"));
5440 addItem(
"hevc", tr(
"Recording is using HEVC/H.265 codec"));
5449 item->DisplayState(state,
"icons");
5454 QDateTime now = QDateTime::currentDateTime();
5458 QMap<int, JobQueueEntry> jobs;
5461 for (
const auto& job : std::as_const(jobs))
5463 m_jobs.insert(qMakePair(job.chanid, job.recstartts), job);
5470 const QDateTime &recstartts)
5473 QList<JobQueueEntry> values = m_jobs.values(qMakePair(chanid, recstartts));
5474 auto end = values.cend();
5475 for (
auto iter = values.cbegin(); iter != end; ++iter)
5477 if (iter->type == jobType)
5484 const QDateTime &recstartts)
5487 QList<JobQueueEntry> values = m_jobs.values(qMakePair(chanid, recstartts));
5488 auto end = values.cend();
5489 for (
auto iter = values.cbegin(); iter != end; ++iter)
5491 if (iter->type == jobType)
5498 const QDateTime &recstartts)
5500 return IsJobQueued(jobType, chanid, recstartts) ||
5501 IsJobRunning(jobType, chanid, recstartts);
void Add(const ProgramInfo &pginfo)
Adds a ProgramInfo to the cache.
void DeleteRecording(uint recordingID, bool forceDelete, bool forgetHistory)
void ApplyRecordPlayGroupChange(const QString &newplaygroup)
Sets the recording group, both in this RecordingInfo and in the database.
void toggleRecGroupView(bool setOn)
void updateIcons(const ProgramInfo *pginfo=nullptr)
bool QueryIsDeleteCandidate(bool one_playback_allowed=false) const
Returns true iff this is a recording, it is not in use (except by the recorder), and at most one play...
void LoadInBackground(const QString &message="")
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
void SetAvailableStatus(AvailableStatusType status, const QString &where)
QSqlQuery wrapper that fetches a DB connection from the connection pool.
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
MythScreenStack * GetMainStack()
void RequestEmbedding(bool Embed, const QRect &Rect={}, const QStringList &Data={})
void doCreateTranscodingProfilesMenu()
void SetMaxLength(int length)
void DeleteForceAllRemaining(void)
static void * RunPlaybackBox(void *player, bool showTV)
void stopPlaylistFlagging()
bool IsSameProgram(const ProgramInfo *ProgInfo) const
void UpdateLastDelete(bool setTime) const
Set or unset the record.last_delete field.
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
#define ACTION_VIEWSCHEDULED
QString GetMasterHostName(void)
static const QRegularExpression kReSearchTypeName
virtual uint64_t GetFilesize(void) const
@ kStartTVIgnoreProgStart
void UpdateUIGroupList(const QStringList &groupPreferences)
void setPlayGroup(QString newPlayGroup)
static const Type kMythEventMessage
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Image widget, displays a single image or multiple images in sequence.
static int comp_season(const ProgramInfo *a, const ProgramInfo *b)
virtual int DecrRef(void)
Decrements reference count and deletes on 0.
void ShowNotificationError(const QString &msg, const QString &from, const QString &detail, const VNMask visibility, const MythNotification::Priority priority)
convenience utility to display error message as notification
void SaveBookmark(uint64_t frame)
Clears any existing bookmark in DB and if frame is greater than 0 sets a new bookmark.
void SetRecordingStatus(RecStatus::Type status)
QString GetHostname(void) const
void updateRecGroup(MythUIButtonListItem *sel_item)
~PlaybackBox(void) override
void ShowNotification(const QString &msg, const QString &from, const QString &detail, const VNMask visibility, const MythNotification::Priority priority)
QString m_currentGroup
Group currently selected.
QString GetRecordingGroup() const
static bool QueueJob(int jobType, uint chanid, const QDateTime &recstartts, const QString &args="", const QString &comment="", QString host="", int flags=0, int status=JOB_QUEUED, QDateTime schedruntime=QDateTime())
std::array< MythUIImage *, kNumArtImages > m_artImage
virtual void ResetMap(const InfoMap &infoMap)
QDateTime as_utc(const QDateTime &old_dt)
Returns copy of QDateTime with TimeSpec set to UTC.
static int comp_recordDate(const ProgramInfo *a, const ProgramInfo *b)
uint64_t GetFreeSpaceTotalMB(void) const
void saveRecMetadata(const QString &newTitle, const QString &newSubtitle, const QString &newDescription, const QString &newInetref, uint season, uint episode)
void doPlaylistBeginUserJob2()
void SetRecGroupPassword(const QString &newPassword)
static bool ChangeJobCmds(int jobID, int newCmds)
void customEvent(QEvent *event) override
static int comp_programid(const ProgramInfo *a, const ProgramInfo *b)
@ kCheckForPlaylistAction
static QString CreateProgramInfoString(const ProgramInfo &pginfo)
void doPlaylistBeginFlagging()
MythScreenStack * m_popupStack
void SetItemIcons(MythUIButtonListItem *item, ProgramInfo *pginfo)
MythUIImage * m_previewImage
#define ACTION_LISTRECORDEDEPISODES
Holds information on a TV Program one might wish to record.
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
virtual void ShowUpcomingScheduled(void) const
Show the upcoming recordings for this recording rule.
static int comp_originalAirDate(const ProgramInfo *a, const ProgramInfo *b)
void setRecGroup(QString newRecGroup)
void GetOrdered(std::vector< ProgramInfo * > &list, bool newest_first=false)
void ForgetHistory(void)
Forget the recording of a program so it will be recorded again.
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
uint GetRecordingID(void) const
void stopPlaylistUserJob3()
QString getRecGroupPassword(const QString &recGroup)
bool Create(void) override
int m_listOrder
listOrder controls the ordering of the recordings in the list
static int comp_recordDate_rev(const ProgramInfo *a, const ProgramInfo *b)
void doBeginTranscoding()
void UpdateUIRecGroupList(void)
This class is used as a container for messages.
void showViewChanger(void)
bool Create(void) override
QStringList m_playerSelectedNewShow
#define ACTION_TOGGLERECORD
static constexpr std::chrono::milliseconds kInvalidateTimeMs
static void RemoveListener(QObject *listener)
Stop receiving notifications when a preview event is generated.
void ItemVisible(MythUIButtonListItem *item)
QVariant value(int i) const
void updateGroupInfo(const QString &groupname, const QString &grouplabel)
static bool comp_recordDate_rev_less_than(const ProgramInfo *a, const ProgramInfo *b)
MythUITextEdit * m_oldPasswordEdit
void doJobQueueJob(int jobType, int jobFlags=0)
MythDialogBox * m_menuDialog
static bool comp_originalAirDate_rev_less_than(const ProgramInfo *a, const ProgramInfo *b)
void SetCanTakeFocus(bool set=true)
Set whether this widget can take focus.
Internal representation of a recording rule, mirrors the record table.
void PlayFromLastPlayPos()
PlaybackBox(MythScreenStack *parent, const QString &name, TV *player=nullptr, bool showTV=false)
void SetEditing(bool editing)
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
static bool comp_season_less_than(const ProgramInfo *a, const ProgramInfo *b)
void toggleCategoryView(bool setOn)
A text entry and edit widget.
static int comp_programid_rev(const ProgramInfo *a, const ProgramInfo *b)
void ShowDeletePopup(DeletePopupType type)
void ScheduleUpdateUIList(void)
int m_watchListMaxAge
add 1 to the Watch List scord up to this many days
#define ACTION_PREVRECORDED
virtual void ShowGuide(void) const
Show the program guide.
void doPlaylistWatchedSetOn()
bool IsPathSet(void) const
bool m_playingSomething
playingSomething is set to true iff a full screen recording is playing
bool IsInUsePlaying(void) const
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
void Closed(QString, int)
PlaybackBox * m_parentScreen
void DeleteForgetHistory(void)
Screen in which all other widgets are contained and rendered.
static bool comp_recordDate_less_than(const ProgramInfo *a, const ProgramInfo *b)
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
bool IsJobRunning(int jobType, uint chanid, const QDateTime &recstartts)
static QString construct_sort_title(QString title, const QString &sortTitle, PlaybackBox::ViewMask viewmask, PlaybackBox::ViewTitleSort sortType, int recpriority)
QString GetText(void) const
bool IsUsageUIVisible(void) const
void doPlaylistExpireSetting(bool turnOn)
void Reset(void) override
Reset the image back to the default defined in the theme.
void passwordClosed(void)
bool m_needUpdate
Does the recording list need to be refilled.
QDateTime GetRecordingEndTime(void) const
Approximate time the recording should have ended, did end, or is intended to end.
void checkPassword(const QString &password)
void stopPlaylistUserJob2()
uint32_t GetProgramFlags(void) const
QString GetRecordingGroup(void) const
void ItemLoaded(MythUIButtonListItem *item)
bool IsLastPlaySet(void) const
void SetRange(int low, int high, int step, uint pageMultiple=5)
Set the lower and upper bounds of the spinbox, the interval and page amount.
void doPlaylistBeginTranscoding()
void UndeleteRecording(uint recordingID)
virtual void ShowDetails(void) const
Show the Program Details screen.
PlaybackBoxHelper m_helper
Main helper thread.
void ShowMenu(void) override
const QString & Message() const
void RemoveProgram(uint recordingID, bool forgetHistory, bool forceMetadataDelete)
void stopPlaylistJobQueueJob(int jobType)
void stopPlaylistTranscoding()
QDateTime GetRecordingStartTime(void) const
Approximate time the recording started.
static bool StartTV(ProgramInfo *TVRec, uint Flags, const ChannelInfoList &Selection=ChannelInfoList())
Start playback of media.
void playSelectedPlaylist(bool Random)
bool IsWatched(void) const
static PlaybackBox::ViewMask m_viewMaskToggle(PlaybackBox::ViewMask mask, PlaybackBox::ViewMask toggle)
void showRecGroupPasswordChanger()
virtual void EditScheduled(void)
Creates a dialog for editing the recording schedule.
static void push_onto_del(QStringList &list, const ProgramInfo &pginfo)
MythUIType * GetFocusWidget(void) const
constexpr static int kNumArtImages
QHash< QString, QString > InfoMap
static const QString sLocation
bool IsPreserved(void) const
void addListener(QObject *listener)
Add a listener to the observable.
static QStringList GetNames(void)
@ kState_WatchingRecording
Watching Recording is the state for when we are watching an in progress recording,...
bool Create(void) override
@ kState_None
None State, this is the initial state in both TV and TVRec, it indicates that we are ready to change ...
QString GetInetRef(void) const
void SetValue(int val) override
void doPlaylistBeginLookup()
QString m_watchGroupLabel
void SetText(const QString &text, bool moveCursor=true)
MythUIButtonList * m_groupList
virtual void ShowPrevious(void) const
Show the previous recordings for this recording rule.
void AcceptItem(MythUIButtonListItem *item)
static int GetJobsInQueue(QMap< int, JobQueueEntry > &jobs, int findJobs=JOB_LIST_NOT_DONE)
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
MythMenu * createPlaylistMenu()
void SetPathname(const QString &pn)
void OldPasswordChanged(void)
MythUIProgressBar * m_recordedProgress
QList< uint > m_playListPlay
list of items being played.
QDateTime GetScheduledStartTime(void) const
The scheduled start time of program.
virtual void EditCustom(void)
Creates a dialog for creating a custom recording rule.
static bool IsJobQueuedOrRunning(int jobType, uint chanid, const QDateTime &recstartts)
RecStatus::Type GetRecordingStatus(void) const
void updateRecList(MythUIButtonListItem *sel_item)
void doPlaylistBeginUserJob3()
void stopPlaylistLookup()
static constexpr const char * ACTION_1
void toggleWatchedView(bool setOn)
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
void ItemSelected(MythUIButtonListItem *item)
void doPlaylistAllowRerecord()
void groupSelectorClosed(void)
MythMenu * createTranscodingProfilesMenu()
void Set(int start, int total, int used)
bool IsJobQueued(int jobType, uint chanid, const QDateTime &recstartts)
QString GetPreviewImage(const ProgramInfo &pginfo, bool check_availability=true)
MythMenu * createPlayFromMenu()
bool SetFocusWidget(MythUIType *widget=nullptr)
void saveViewChanges(void)
Basic menu dialog, message and a list of options.
static bool comp_originalAirDate_less_than(const ProgramInfo *a, const ProgramInfo *b)
void processNetworkControlCommands(void)
static MythThemedMenu * menu
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
QString GetTitle(void) const
QString GetDescription(void) const
int GetIntValue(void) const override
bool Create(void) override
void DisplayPopupMenu(void)
static void DBError(const QString &where, const MSqlQuery &query)
void DeleteRecordings(const QStringList &list)
std::enable_if_t< std::chrono::__is_duration< T >::value, T > GetDurSetting(const QString &key, T defaultval=T::zero())
void BuildFocusList(void)
def rating(profile, smoonURL, gate)
void ShowRecGroupChangerUsePlaylist(void)
void HandleRecordingAddEvent(const ProgramInfo &evinfo)
bool HasCutlist(void) const
void ScheduleLoad(bool updateUI=true)
ProgramInfoCache::UpdateStates Update(const ProgramInfo &pginfo)
Updates a ProgramInfo in the cache.
bool IsJobQueuedOrRunning(int jobType, uint chanid, const QDateTime &recstartts)
void HandlePreviewEvent(const QStringList &list)
Updates the UI properties for a new preview file.
void toggleTitleView(bool setOn)
virtual void SetTextFromMap(const InfoMap &infoMap)
@ kDateShort
Default local time.
QString extract_commflag_state(const ProgramInfo &pginfo)
ProgramInfo * GetRecordingInfo(uint recordingID) const
static int comp_season_rev(const ProgramInfo *a, const ProgramInfo *b)
void deleteSelected(MythUIButtonListItem *item)
QString toString(Verbosity v=kLongDescription, const QString &sep=":", const QString &grp="\"") const
void fillRecGroupPasswordCache(void)
void Refresh(void)
Refreshed the cache.
void togglePreserveEpisode()
void run(const QString &name, Class *object, void(Class::*fn)())
static void AddListener(QObject *listener)
Request notifications when a preview event is generated.
void toggleSearchView(bool setOn)
MythMenu * createPlaylistStorageMenu()
void SetPassword(bool isPassword)
static const std::array< const int, kMaxJobs > kJobs
void DeleteIgnoreAllRemaining(void)
uint GetAudioProperties(void) const
void SetEnabled(bool enable)
MythUITextEdit * m_newPasswordEdit
QString intToPaddedString(int n, int width=2)
Creates a zero padded string representation of an integer.
QString GetPlaybackGroup(void) const
static int comp_originalAirDate_rev(const ProgramInfo *a, const ProgramInfo *b)
void setGroupFilter(const QString &newRecGroup)
static int comp_recpriority2(const ProgramInfo *a, const ProgramInfo *b)
void doPlaylistExpireSetOff()
virtual void SetFilesize(uint64_t sz)
int m_progsInDB
total number of recordings in DB
void PlaylistDelete(bool forgetHistory=false)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
static bool extract_one_del(QStringList &list, uint &recordingID)
static QString extract_main_state(const ProgramInfo &pginfo, const TV *player)
A checkbox widget supporting three check states - on,off,half and two conditions - selected and unsel...
static QString i18n(const QString &msg)
Translations for play,recording, & storage groups +.
void popupClosed(const QString &which, int result)
bool Create(void) override
QMap< QString, QString > m_recGroupPwCache
int GetNumSetting(const QString &key, int defaultval=0)
QStringList m_titleList
list of pages
static bool save_position(const MythUIButtonList *groupList, const MythUIButtonList *recordingList, QStringList &groupSelPref, QStringList &itemSelPref, QStringList &itemTopPref)
QDate GetOriginalAirDate(void) const
void SaveAutoExpire(AutoExpireType autoExpire, bool updateDelete=false)
Set "autoexpire" field in "recorded" table to "autoExpire".
void showMetadataEditor()
void selected(MythUIButtonListItem *item)
uint GetVideoProperties(void) const
class PlaybackBox::PbbJobQueue m_jobQueue
QDateTime fromString(const QString &dtstr)
Converts kFilename && kISODate formats to QDateTime.
void WaitForLoadToComplete(void) const
MythMenu * createPlaylistJobMenu()
bool IsLoadInProgress(void) const
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
QString m_curGroupPassword
bool GetBoolSetting(const QString &key, bool defaultval=false)
static constexpr size_t kMaxJobs
void ShowActionPopup(const ProgramInfo &pginfo)
void UpdateUIListItem(ProgramInfo *pginfo, bool force_preview_reload)
std::array< QTimer *, kNumArtImages > m_artTimer
void toggleWatchListView(bool setOn)
AutoDeleteDeque< ProgramInfo * > ProgramList
void doPlaylistWatchedSetting(bool turnOn)
duration< CHRONO_TYPE, ratio< 86400 > > days
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
uint GetEpisode(void) const
AutoExpireType QueryAutoExpire(void) const
Returns "autoexpire" field from "recorded" table.
void doPlaylistBeginUserJob1()
Holds information on recordings and videos.
bool LoadTemplate(const QString &title, const QString &category="Default", const QString &categoryType="Default")
All purpose text widget, displays a text string.
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
void stopPlaylistUserJob4()
void PlayX(const ProgramInfo &pginfo, bool ignoreBookmark, bool ignoreProgStart, bool ignoreLastPlayPos, bool underNetworkControl)
QSet< QString > m_previewTokens
Outstanding preview image requests.
void changeProfileAndTranscode(int id)
TVState
TVState is an enumeration of the states used by TV and TVRec.
QList< uint > m_playList
list of selected items "play list"
Dialog asking for user confirmation. Ok and optional Cancel button.
void ToStringList(QStringList &list) const
Serializes ProgramInfo into a QStringList which can be passed over a socket.
ProgramInfo * GetCurrentProgram(void) const override
uint GetSeason(void) const
void SetCheckState(MythUIStateType::StateType state)
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
static bool IsJobStatusRunning(int status)
void customEvent(QEvent *event) override
void doAllowRerecord()
Callback function when Allow Re-record is pressed in Watch Recordings.
void PlaylistDeleteForgetHistory(void)
int m_allOrder
allOrder controls the ordering of the "All Programs" list
QString GetCategoryTypeString(void) const
Returns catType as a string.
QString extract_job_state(const ProgramInfo &pginfo)
static QMap< QString, QString > iconMap
QString GetPlaybackURL(bool checkMaster=false, bool forceCheckLocal=false)
Returns filename or URL to be used to play back this recording.
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
void doPlaylistWatchedSetOff()
void ShowRecGroupChangerNoPlaylist(void)
static bool comp_recpriority2_less_than(const ProgramInfo *a, const ProgramInfo *b)
void UpdateFileSize(uint recordingID, uint64_t filesize, UpdateStates flags)
Updates a ProgramInfo in the cache.
static std::array< PlaybackBoxCb, kMaxJobs *2 > kMySlots
QString m_artHostOverride
void processNetworkControlCommand(const QString &command)
void HandleUpdateItemEvent(uint recordingId, uint flags)
void togglePlayListTitle(void)
void SaveWatched(bool watchedFlag)
Set "watched" field in recorded/videometadata to "watchedFlag".
virtual void SetText(const QString &text)
void ShowGroupPopup(void)
void ApplyTranscoderProfileChangeById(int id)
virtual void SetVisible(bool visible)
QStringList m_delList
Recording[s] currently selected for deletion.
@ kStartTVIgnoreLastPlayPos
ProgramMap m_progLists
lists of programs by page
bool IsAutoExpirable(void) const
void result(const QString &)
virtual void ShowUpcoming(void) const
Show the upcoming recordings for this title.
MythUIButton * m_okButton
static const Type kEventType
MythUIText * m_noRecordingsText
ProgramInfo * FindProgramInUILists(const ProgramInfo &pginfo)
MythMainWindow * GetMythMainWindow(void)
@ kState_WatchingLiveTV
Watching LiveTV is the state for when we are watching a recording and the user has control over the c...
MythUIButtonList * m_recgroupList
bool Remove(uint recordingID)
Marks a ProgramInfo in the cache for deletion on the next call to Refresh().
void SetFlagging(bool flagging)
A widget for offering a range of numerical values where only the the bounding values and interval are...
void SelectNextRecGroup(void)
void doPlaylistBeginUserJob4()
void displayRecGroup(const QString &newRecGroup="")
MythMenu * createStorageMenu()
static bool comp_programid_rev_less_than(const ProgramInfo *a, const ProgramInfo *b)
static QString extract_subtitle(const ProgramInfo &pginfo, const QString &groupname)
MythUIProgressBar * m_watchedProgress
MythScreenStack * GetStack(const QString &Stackname)
void ShowPlayGroupChangerNoPlaylist(void)
static bool IsJobStatusQueued(int status)
void StopRecording(const ProgramInfo &pginfo)
void stopPlaylistUserJob1()
bool m_watchListAutoExpire
exclude recording not marked for auto-expire from the Watch List
MythMenu * createRecordingMenu()
ProgramInfoCache m_programInfoCache
bool Play(const ProgramInfo &rec, bool inPlaylist, bool ignoreBookmark, bool ignoreProgStart, bool ignoreLastPlayPos, bool underNetworkControl)
QString m_groupDisplayName
QString GetProgramID(void) const
bool QueryIsInUse(QStringList &byWho) const
Returns true if Program is in use.
MythMenu * createJobMenu()
static void restore_position(MythUIButtonList *groupList, MythUIButtonList *recordingList, const QStringList &groupSelPref, const QStringList &itemSelPref, const QStringList &itemTopPref)
void ApplyRecordRecTitleChange(const QString &newTitle, const QString &newSubtitle, const QString &newDescription)
Sets the recording title, subtitle, and description both in this RecordingInfo and in the database.
std::chrono::hours m_watchListBlackOut
adjust exclusion of a title from the Watch List after a delete
@ kDateTimeFull
Default local time.
static bool comp_season_rev_less_than(const ProgramInfo *a, const ProgramInfo *b)
int GetRecordingPriority2(void) const
QString LocateArtwork(const QString &inetref, uint season, VideoArtworkType type, const ProgramInfo *pginfo, const QString &groupname=nullptr)
Dialog prompting the user to enter a text string.
QMap< QString, QString > m_recGroupType
void SaveSetting(const QString &key, int newValue)
@ kTime
Default local time.
void toggleLiveTVView(bool setOn)
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
void ApplyRecordRecGroupChange(const QString &newrecgroup)
Sets the recording group, both in this RecordingInfo and in the database.
static bool comp_programid_less_than(const ProgramInfo *a, const ProgramInfo *b)
bool m_alwaysShowWatchedProgress
@ kStartTVByNetworkCommand
void togglePlayListItem(void)
MythUIButtonList * m_recordingList
uint64_t GetFreeSpaceUsedMB(void) const
virtual int IncrRef(void)
Increments reference count.
uint GetSubtitleType(void) const
AvailableStatusType GetAvailableStatus(void) const
void ShowRecordedEpisodes()
void PlaylistDeleteKeepHistory(void)
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
void doPlaylistJobQueueJob(int jobType, int jobFlags=0)
void dispatch(const MythEvent &event)
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
bool IsBookmarkSet(void) const
std::deque< QString > m_networkControlCommands
uint32_t MythRandom()
generate 32 random bits
void doPlaylistExpireSetOn()
static void ShowAvailabilityPopup(const ProgramInfo &pginfo)
bool m_watchListStart
use the Watch List as the initial view
static const std::array< const uint, 3 > s_artDelay
void CheckAvailability(const ProgramInfo &pginfo, CheckAvailabilityType cat=kCheckForCache)
void removeListener(QObject *listener)
Remove a listener to the observable.
void ShowRecGroupChanger(bool use_playlist=false)
Used to change the recording group of a program or playlist.
void ForceFreeSpaceUpdate(void)
This widget is used for grouping other widgets for display when a particular named state is called....
void SaveBoolSetting(const QString &key, bool newValue)
static const std::array< const std::string, 9 > disp_flags
friend class PlaybackBoxListItem
bool HasPathname(void) const
static pid_list_t::iterator find(const PIDInfoMap &map, pid_list_t &list, pid_list_t::iterator begin, pid_list_t::iterator end, bool find_open)
void HandleRecordingRemoveEvent(uint recordingID)
bool DisplayState(const QString &name)
void ShowPlayGroupChangerUsePlaylist(void)
void SaveLastPlayPos(uint64_t frame)
TODO Move to RecordingInfo.
bool Create(void) override
QString GetSetting(const QString &key, const QString &defaultval="")
bool m_usingGroupSelector
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
void ShowPlayGroupChanger(bool use_playlist=false)
Used to change the play group of a program or playlist.
QString GetSubtitle(void) const
void toggleView(PlaybackBox::ViewMask itemMask, bool setOn)