diff --git a/mythtv/bindings/perl/IO/Socket/INET/MythTV.pm b/mythtv/bindings/perl/IO/Socket/INET/MythTV.pm index 31be7d7f587..b7ac1b75a74 100644 --- a/mythtv/bindings/perl/IO/Socket/INET/MythTV.pm +++ b/mythtv/bindings/perl/IO/Socket/INET/MythTV.pm @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# A MythTV Socket class that extends IO::Socket::INET to include some +# A MythTV Socket class that extends IO::Socket::INET6 to include some # MythTV-specific data queries # # @url $URL$ @@ -11,9 +11,9 @@ # package IO::Socket::INET::MythTV; - use base 'IO::Socket::INET'; + use base 'IO::Socket::INET6'; -# Basically, just inherit the constructor from IO::Socket::INET +# Basically, just inherit the constructor from IO::Socket::INET6 sub new { my $class = shift; return $class->SUPER::new(@_); diff --git a/mythtv/configure b/mythtv/configure index 9228929e57e..34f7e9277fc 100755 --- a/mythtv/configure +++ b/mythtv/configure @@ -4300,12 +4300,15 @@ if enabled bindings_perl; then check_pl_lib "Sys::Hostname" || disable_bindings_perl "Sys::Hostname" # Modules not distributed in Perl core check_pl_lib DBI || disable_bindings_perl DBI + check_pl_lib "DBD::mysql" || disable_bindings_perl "DBD::mysql" check_pl_lib "HTTP::Request" || disable_bindings_perl "HTTP::Request" check_pl_lib "LWP::UserAgent" || disable_bindings_perl "LWP::UserAgent" check_pl_lib "Net::UPnP::QueryResponse" || disable_bindings_perl "Net::UPnP::QueryResponse" check_pl_lib "Net::UPnP::ControlPoint" || disable_bindings_perl "Net::UPnP::ControlPoint" + check_pl_lib "IO::Socket::INET6" || + disable_bindings_perl "IO::Socket::INET6" fi # Check for php dependencies diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp index e0d667325f9..e902929eddb 100644 --- a/mythtv/libs/libmyth/programinfo.cpp +++ b/mythtv/libs/libmyth/programinfo.cpp @@ -1528,6 +1528,9 @@ void ProgramInfo::ToMap(InfoMap &progMap, progMap["recstatus"] = ::toString(GetRecordingStatus(), GetRecordingRuleType()); + progMap["recstatuslong"] = ::toDescription(GetRecordingStatus(), + GetRecordingRuleType(), + GetRecordingStartTime()); if (IsRepeat()) { @@ -1578,6 +1581,42 @@ void ProgramInfo::ToMap(InfoMap &progMap, progMap["originalairdate"] = MythDateToString(originalAirDate, kDateFull); progMap["shortoriginalairdate"] = MythDateToString(originalAirDate, kDateShort); } + + // 'mediatype' for a statetype, so untranslated + // 'mediatypestring' for textarea, so translated + // TODO Move to a dedicated ToState() method? + QString mediaType; + QString mediaTypeString; + switch (GetProgramInfoType()) + { + case kProgramInfoTypeVideoFile : + mediaType = "video"; + mediaTypeString = QObject::tr("Video"); + break; + case kProgramInfoTypeVideoDVD : + mediaType = "dvd"; + mediaTypeString = QObject::tr("DVD"); + break; + case kProgramInfoTypeVideoStreamingHTML : + mediaType = "httpstream"; + mediaTypeString = QObject::tr("HTTP Streaming"); + break; + case kProgramInfoTypeVideoStreamingRTSP : + mediaType = "rtspstream"; + mediaTypeString = QObject::tr("RTSP Streaming"); + break; + case kProgramInfoTypeVideoBD : + mediaType = "bluraydisc"; + mediaTypeString = QObject::tr("Blu-Ray Disc"); + break; + case kProgramInfoTypeRecording : // Fall through + default : + mediaType = "recording"; + mediaTypeString = QObject::tr("Recording", + "Recorded file, object not action"); + } + progMap["mediatype"] = mediaType; + progMap["mediatypestring"] = mediaTypeString; } /// \brief Returns length of program/recording in seconds. @@ -1951,7 +1990,7 @@ bool ProgramInfo::IsSameTimeslot(const ProgramInfo& other) const return false; if (startts == other.startts && (chanid == other.chanid || - (!chansign.isEmpty() && + (!chansign.isEmpty() && chansign.compare(other.chansign, Qt::CaseInsensitive) == 0))) return true; @@ -1969,7 +2008,7 @@ bool ProgramInfo::IsSameProgramTimeslot(const ProgramInfo &other) const if (title.compare(other.title, Qt::CaseInsensitive) != 0) return false; if ((chanid == other.chanid || - (!chansign.isEmpty() && + (!chansign.isEmpty() && chansign.compare(other.chansign, Qt::CaseInsensitive) == 0)) && startts < other.endts && endts > other.startts) @@ -2003,7 +2042,7 @@ void ProgramInfo::CheckProgramIDAuthorities(void) } int numAuths = authMap.count(); - LOG(VB_GENERAL, LOG_INFO, + LOG(VB_GENERAL, LOG_INFO, QString("Found %1 distinct programid authorities").arg(numAuths)); usingProgIDAuth = (numAuths > 1); diff --git a/mythtv/libs/libmyth/programtypes.cpp b/mythtv/libs/libmyth/programtypes.cpp index 0060b0e8b07..0349297658e 100644 --- a/mythtv/libs/libmyth/programtypes.cpp +++ b/mythtv/libs/libmyth/programtypes.cpp @@ -215,8 +215,12 @@ QString toString(RecStatusType recstatus, RecordingType rectype) } /// \brief Converts "recstatus" into a long human readable description. -QString toDescription(RecStatusType recstatus, const QDateTime &recstartts) +QString toDescription(RecStatusType recstatus, RecordingType rectype, + const QDateTime &recstartts) { + if (rectype == kNotRecording) + return QObject::tr("This showing is not scheduled to record"); + QString message; QDateTime now = QDateTime::currentDateTime(); diff --git a/mythtv/libs/libmyth/programtypes.h b/mythtv/libs/libmyth/programtypes.h index 9bcccc38aa5..6864e8119ef 100644 --- a/mythtv/libs/libmyth/programtypes.h +++ b/mythtv/libs/libmyth/programtypes.h @@ -99,7 +99,7 @@ typedef enum SkipTypes { * are just too many false positives from non-commercial cut scenes. */ COMM_DETECT_2_ALL = (COMM_DETECT_2_LOGO | COMM_DETECT_2_BLANK), - COMM_DETECT_PREPOSTROLL = 0x00000200, + COMM_DETECT_PREPOSTROLL = 0x00000200, COMM_DETECT_PREPOSTROLL_ALL = (COMM_DETECT_PREPOSTROLL | COMM_DETECT_BLANKS | COMM_DETECT_SCENE) @@ -144,7 +144,7 @@ typedef enum FlagMask { } ProgramFlag; typedef enum ProgramInfoType { - kProgramInfoTypeRecording = 0, + kProgramInfoTypeRecording = 0, kProgramInfoTypeVideoFile, kProgramInfoTypeVideoDVD, kProgramInfoTypeVideoStreamingHTML, @@ -227,7 +227,8 @@ typedef enum RecStatusTypes { MPUBLIC QString toUIState(RecStatusType); MPUBLIC QString toString(RecStatusType, uint id); MPUBLIC QString toString(RecStatusType, RecordingType); -MPUBLIC QString toDescription(RecStatusType, const QDateTime &recstartts); +MPUBLIC QString toDescription(RecStatusType, RecordingType, + const QDateTime &recstartts); typedef enum AvailableStatusTypes { asAvailable = 0, diff --git a/mythtv/libs/libmythbase/compat.h b/mythtv/libs/libmythbase/compat.h index 9d30411f77f..ff2890f29ed 100644 --- a/mythtv/libs/libmythbase/compat.h +++ b/mythtv/libs/libmythbase/compat.h @@ -350,7 +350,7 @@ static inline struct tm *localtime_r(const time_t *timep, struct tm *result) #endif #include /* for FILENAME_MAX */ -#if defined(USING_MINGW) && defined(FILENAME_MAX) +#if defined(USING_MINGW) && defined(FILENAME_MAX) && !defined( _MSC_VER ) #include #include #include diff --git a/mythtv/libs/libmythbase/mythcorecontext.cpp b/mythtv/libs/libmythbase/mythcorecontext.cpp index 919a5f14cfe..1b82082cfa0 100644 --- a/mythtv/libs/libmythbase/mythcorecontext.cpp +++ b/mythtv/libs/libmythbase/mythcorecontext.cpp @@ -714,7 +714,8 @@ void MythCoreContext::ConfigureHostAddress(void) .arg(it->toString())); d->m_IPv6.append(*it); } - LOG(VB_GENERAL, LOG_DEBUG, QString("Skipping link-local " + else + LOG(VB_GENERAL, LOG_DEBUG, QString("Skipping link-local " "address during IPv6 autoselection: %1") .arg(it->toString())); } @@ -964,6 +965,25 @@ double MythCoreContext::GetFloatSettingOnHost(const QString &key, return d->m_database->GetFloatSettingOnHost(key, host, defaultval); } +#if 0 +QString MythCoreContext::GetMasterServerIP(void) +{ + QString saddr = GetSetting("MasterServerIP"); + QHostAddress addr(saddr); + + if (!d->m_IPv6.empty() && + (addr.protocol() == QAbstractSocket::IPv6Protocol)) + // we have IPv6 addresses, assume we can connect to them + return saddr; + else if (!d->m_IPv4.empty() && + (addr.protocol() == QAbstractSocket::IPv4Protocol)) + // we have IPv4 addresses, assume we can connect to them + return saddr; + else + return GetBackendServerIP(GetMasterHostName()); +} +#endif + QString MythCoreContext::GetBackendServerIP(void) { return GetBackendServerIP(d->m_localHostname); @@ -971,23 +991,33 @@ QString MythCoreContext::GetBackendServerIP(void) QString MythCoreContext::GetBackendServerIP(const QString &host) { + QString addr4, addr6; #if !defined(QT_NO_IPV6) - // prefer IPv6 address if optional - if (!d->m_IPv6.empty()) - { + if (!d->m_IPv6.isEmpty()) // we have IPv6 addresses, assume we can connect to them - QString address = GetSettingOnHost("BackendServerIP6", host, ""); - if (!address.isEmpty()) - return address; - } + addr6 = GetSettingOnHost("BackendServerIP6", host, ""); #endif - // fall back to IPv4 address - QString address = GetSettingOnHost("BackendServerIP", host, ""); - if (!address.isEmpty()) - return address; + if (!d->m_IPv4.isEmpty()) + addr4 = GetSettingOnHost("BackendServerIP", host, ""); + + if (addr6.isEmpty()) + { + if (addr4.isEmpty()) + { + LOG(VB_GENERAL, LOG_ERR, "No address defined for host: "+host); + return ""; + } - LOG(VB_GENERAL, LOG_WARNING, "No address defined for host: "+host); - return ""; + // IPv6 is empty, so return this regardless + return addr4; + } + else if ((QHostAddress(addr6) == QHostAddress::LocalHostIPv6) && + !addr4.isEmpty() && + (QHostAddress(addr4) != QHostAddress::LocalHost)) + // IPv6 set to localhost, but IPv4 address if network accessible + return addr4; + else + return addr6; } void MythCoreContext::SetSetting(const QString &key, const QString &newValue) diff --git a/mythtv/libs/libmythmetadata/metadatafactory.cpp b/mythtv/libs/libmythmetadata/metadatafactory.cpp index 27603c5867e..8a0779195b8 100644 --- a/mythtv/libs/libmythmetadata/metadatafactory.cpp +++ b/mythtv/libs/libmythmetadata/metadatafactory.cpp @@ -630,7 +630,8 @@ LookupType GuessLookupType(ProgramInfo *pginfo) // subtitle, it's *probably* a movie. If it's some // weird combination of both, we've got to try everything. RecordingRule *rule = new RecordingRule(); - rule->LoadByProgram(pginfo); + rule->m_recordID = pginfo->GetRecordingRuleID(); + rule->Load(); int ruleepisode = rule->m_episode; delete rule; diff --git a/mythtv/libs/libmythtv/deletemap.cpp b/mythtv/libs/libmythtv/deletemap.cpp index 4f75d13f7e1..d5659307292 100644 --- a/mythtv/libs/libmythtv/deletemap.cpp +++ b/mythtv/libs/libmythtv/deletemap.cpp @@ -549,13 +549,18 @@ bool DeleteMap::IsTemporaryMark(uint64_t frame) const } /** - * \brief Returns the next or previous mark. If these do not exist, returns - * either zero (the first frame) or total (the last frame). + * \brief Returns the next or previous mark. If these do not exist, + * returns either zero (the first frame) or total (the last + * frame). If hasMark is non-NULL, it is set to true if the + * next/previous mark exists, and false otherwise. */ uint64_t DeleteMap::GetNearestMark( - uint64_t frame, uint64_t total, bool right) const + uint64_t frame, uint64_t total, bool right, + bool *hasMark) const { uint64_t result; + if (hasMark) + *hasMark = true; frm_dir_map_t::const_iterator it = m_deleteMap.begin(); if (right) { @@ -574,6 +579,8 @@ uint64_t DeleteMap::GetNearestMark( result = it.key(); } } + if (hasMark) + *hasMark = false; return result; } @@ -740,6 +747,7 @@ void DeleteMap::SaveMap(uint64_t total, bool isAutoSave) void DeleteMap::TrackerReset(uint64_t frame, uint64_t total) { m_nextCutStart = 0; + m_nextCutStartIsValid = false; if (IsEmpty()) return; @@ -748,16 +756,19 @@ void DeleteMap::TrackerReset(uint64_t frame, uint64_t total) { if (cutpoint.value() == MARK_CUT_START) { + m_nextCutStartIsValid = true; m_nextCutStart = cutpoint.key(); } else { ++cutpoint; - m_nextCutStart = cutpoint != m_deleteMap.end() ? cutpoint.key() : total; + m_nextCutStartIsValid = (cutpoint != m_deleteMap.end()); + m_nextCutStart = m_nextCutStartIsValid ? cutpoint.key() : total; } } else - m_nextCutStart = GetNearestMark(frame, total, !IsInDelete(frame)); + m_nextCutStart = GetNearestMark(frame, total, !IsInDelete(frame), + &m_nextCutStartIsValid); LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Tracker next CUT_START: %1") .arg(m_nextCutStart)); } @@ -768,7 +779,7 @@ void DeleteMap::TrackerReset(uint64_t frame, uint64_t total) */ bool DeleteMap::TrackerWantsToJump(uint64_t frame, uint64_t total, uint64_t &to) { - if (IsEmpty() || frame < m_nextCutStart) + if (IsEmpty() || !m_nextCutStartIsValid || frame < m_nextCutStart) return false; to = GetNearestMark(m_nextCutStart, total, true); diff --git a/mythtv/libs/libmythtv/deletemap.h b/mythtv/libs/libmythtv/deletemap.h index cbc0623bc87..f111ca3b57d 100644 --- a/mythtv/libs/libmythtv/deletemap.h +++ b/mythtv/libs/libmythtv/deletemap.h @@ -19,7 +19,9 @@ typedef struct DeleteMapUndoEntry class MTV_PUBLIC DeleteMap { public: - DeleteMap(): m_editing(false), m_nextCutStart(0), m_changed(true), + DeleteMap(): m_editing(false), + m_nextCutStartIsValid(false), + m_nextCutStart(0), m_changed(true), m_seekamountpos(4), m_seekamount(30), m_ctx(0), m_undoStackPointer(-1) { Push(""); } @@ -56,7 +58,8 @@ class MTV_PUBLIC DeleteMap void Move(uint64_t frame, uint64_t to, uint64_t total); bool IsInDelete(uint64_t frame) const; - uint64_t GetNearestMark(uint64_t frame, uint64_t total, bool right) const; + uint64_t GetNearestMark(uint64_t frame, uint64_t total, bool right, + bool *hasMark = 0) const; bool IsTemporaryMark(uint64_t frame) const; bool HasTemporaryMark(void) const; uint64_t GetLastFrame(uint64_t total) const; @@ -79,6 +82,7 @@ class MTV_PUBLIC DeleteMap void Push(QString undoMessage); bool m_editing; + bool m_nextCutStartIsValid; uint64_t m_nextCutStart; frm_dir_map_t m_deleteMap; QString m_seekText; diff --git a/mythtv/libs/libmythtv/osd.cpp b/mythtv/libs/libmythtv/osd.cpp index 07d562f1c01..88686c4f465 100644 --- a/mythtv/libs/libmythtv/osd.cpp +++ b/mythtv/libs/libmythtv/osd.cpp @@ -463,6 +463,12 @@ void OSD::SetText(const QString &window, QHash &map, if (state) state->DisplayState(map["nightmode"]); } + if (map.contains("mediatype")) + { + MythUIStateType *state = dynamic_cast (win->GetChild("mediatype")); + if (state) + state->DisplayState(map["mediatype"]); + } MythUIProgressBar *bar = dynamic_cast(win->GetChild("elapsedpercent")); diff --git a/mythtv/libs/libmythtv/recordingrule.cpp b/mythtv/libs/libmythtv/recordingrule.cpp index fa052094fac..fcc8fc3041a 100644 --- a/mythtv/libs/libmythtv/recordingrule.cpp +++ b/mythtv/libs/libmythtv/recordingrule.cpp @@ -488,6 +488,17 @@ void RecordingRule::ToMap(InfoMap &infoMap) const infoMap["searchtype"] = SearchTypeToString(m_searchType); if (m_searchType != kNoSearch) infoMap["searchforwhat"] = m_description; + + + if (m_nextRecording.isValid()) + infoMap["nextrecording"] = MythDateTimeToString(m_nextRecording, + kDateFull | kAddYear); + if (m_lastRecorded.isValid()) + infoMap["lastrecorded"] = MythDateTimeToString(m_lastRecorded, + kDateFull | kAddYear); + if (m_lastDeleted.isValid()) + infoMap["lastdeleted"] = MythDateTimeToString(m_lastDeleted, + kDateFull | kAddYear); } void RecordingRule::UseTempTable(bool usetemp, QString table) diff --git a/mythtv/libs/libmythtv/subtitlescreen.cpp b/mythtv/libs/libmythtv/subtitlescreen.cpp index 0ead5165601..e93430f1c84 100644 --- a/mythtv/libs/libmythtv/subtitlescreen.cpp +++ b/mythtv/libs/libmythtv/subtitlescreen.cpp @@ -861,7 +861,7 @@ void FormattedTextSubtitle::InitFromCC608(vector &buffers) int y = (int)(((float)orig_y / (float)yscale) * (float)m_safeArea.height()); FormattedTextLine line(x, y, orig_x, orig_y); - for (int chunk = 0; text != QString::null; chunk++) + while (!text.isNull()) { QString captionText = extract_cc608(text, cc->teletextmode, @@ -1304,11 +1304,11 @@ QStringList FormattedTextSubtitle::ToSRT(void) const return result; } -void SubtitleScreen::SetFontSizes(int small, int medium, int large) +void SubtitleScreen::SetFontSizes(int nSmall, int nMedium, int nLarge) { - m_708fontSizes[k708AttrSizeSmall] = small; - m_708fontSizes[k708AttrSizeStandard] = medium; - m_708fontSizes[k708AttrSizeLarge] = large; + m_708fontSizes[k708AttrSizeSmall] = nSmall; + m_708fontSizes[k708AttrSizeStandard] = nMedium; + m_708fontSizes[k708AttrSizeLarge] = nLarge; } QSize SubtitleScreen::CalcTextSize(const QString &text, diff --git a/mythtv/libs/libmythtv/subtitlescreen.h b/mythtv/libs/libmythtv/subtitlescreen.h index ab40bd04728..76c9f861b28 100644 --- a/mythtv/libs/libmythtv/subtitlescreen.h +++ b/mythtv/libs/libmythtv/subtitlescreen.h @@ -67,7 +67,7 @@ class SubtitleScreen : public MythScreenType void AddScaledImage(QImage &img, QRect &pos); void Clear708Cache(int num); MythFontProperties* Get708Font(CC708CharacterAttribute attr) const; - void SetFontSizes(int small, int medium, int large); + void SetFontSizes(int nSmall, int nMedium, int nLarge); MythPlayer *m_player; SubtitleReader *m_subreader; @@ -110,7 +110,7 @@ class FormattedTextChunk : text(t), format(formatting), parent(p) { } - FormattedTextChunk(void) {} + FormattedTextChunk(void) : parent(NULL) {} QSize CalcSize(void) const { @@ -155,9 +155,23 @@ class FormattedTextSubtitle FormattedTextSubtitle(const QRect &safearea, bool useBackground, SubtitleScreen *p) : m_safeArea(safearea), m_useBackground(useBackground), - parent(p) {} + parent(p) + { + // make cppcheck happy + m_xAnchorPoint = 0; + m_yAnchorPoint = 0; + m_xAnchor = 0; + m_yAnchor = 0; + } FormattedTextSubtitle(void) - : m_safeArea(QRect()), m_useBackground(false), parent(0) {} + : m_safeArea(QRect()), m_useBackground(false), parent(NULL) + { + // make cppcheck happy + m_xAnchorPoint = 0; + m_yAnchorPoint = 0; + m_xAnchor = 0; + m_yAnchor = 0; + } void InitFromCC608(vector &buffers); void InitFromCC708(const CC708Window &win, int num, const vector &list, diff --git a/mythtv/programs/mythfrontend/playbackbox.cpp b/mythtv/programs/mythfrontend/playbackbox.cpp index 5de32255960..74a4a674888 100644 --- a/mythtv/programs/mythfrontend/playbackbox.cpp +++ b/mythtv/programs/mythfrontend/playbackbox.cpp @@ -1144,6 +1144,13 @@ void PlaybackBox::updateIcons(const ProgramInfo *pginfo) if (iconState && !haveIcon) iconState->Reset(); + + iconState = dynamic_cast(GetChild("categorytype")); + if (iconState) + { + if (!(pginfo && iconState->DisplayState(pginfo->GetCategoryType()))) + iconState->Reset(); + } } bool PlaybackBox::IsUsageUIVisible(void) const @@ -1374,6 +1381,8 @@ void PlaybackBox::updateRecList(MythUIButtonListItem *sel_item) if ((*it)->GetSubtitleType() & sit.key()) item->DisplayState(sit.value(), "subtitletypes"); } + + item->DisplayState((*it)->GetCategoryType(), "categorytype"); } if (m_noRecordingsText) diff --git a/mythtv/programs/mythfrontend/schedulecommon.cpp b/mythtv/programs/mythfrontend/schedulecommon.cpp index d7644802b30..5305d57a0c8 100644 --- a/mythtv/programs/mythfrontend/schedulecommon.cpp +++ b/mythtv/programs/mythfrontend/schedulecommon.cpp @@ -9,7 +9,7 @@ #include "programinfo.h" #include "remoteutil.h" -// libmythtv +// libmythtv #include "recordinginfo.h" #include "tvremoteutil.h" @@ -31,23 +31,23 @@ void ScheduleCommon::ShowDetails(ProgramInfo *pginfo) const { if (!pginfo) return; - + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); ProgDetails *details_dialog = new ProgDetails(mainStack, pginfo); - + if (!details_dialog->Create()) { delete details_dialog; return; } - + mainStack->AddScreen(details_dialog); } /** * \brief Show the upcoming recordings for this title */ -void ScheduleCommon::ShowUpcoming(const QString &title, +void ScheduleCommon::ShowUpcoming(const QString &title, const QString &seriesid) const { if (title.isEmpty()) @@ -106,7 +106,7 @@ void ScheduleCommon::EditRecording(ProgramInfo *pginfo) { if (!pginfo) return; - + RecordingInfo ri(*pginfo); if (!ri.GetRecordingRuleID()) @@ -124,7 +124,7 @@ void ScheduleCommon::EditScheduled(ProgramInfo *pginfo) { if (!pginfo) return; - + RecordingInfo ri(*pginfo); EditScheduled(&ri); } @@ -167,10 +167,10 @@ void ScheduleCommon::MakeOverride(RecordingInfo *recinfo, bool startActive) return; RecordingRule *recrule = new RecordingRule(); - + if (!recrule->LoadByProgram(static_cast(recinfo))) LOG(VB_GENERAL, LOG_ERR, "Failed to load by program info"); - + if (!recrule->MakeOverride()) { LOG(VB_GENERAL, LOG_ERR, "Failed to make Override"); @@ -195,21 +195,22 @@ void ScheduleCommon::MakeOverride(RecordingInfo *recinfo, bool startActive) void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo) { QString message = recinfo.toString(ProgramInfo::kTitleSubtitle, " - "); - + message += "\n\n"; - message += toDescription( - recinfo.GetRecordingStatus(), recinfo.GetRecordingStartTime()); - + message += toDescription(recinfo.GetRecordingStatus(), + recinfo.GetRecordingRuleType(), + recinfo.GetRecordingStartTime()); + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythDialogBox *menuPopup = new MythDialogBox(message, popupStack, "recOptionPopup", true); - + if (menuPopup->Create()) { menuPopup->SetReturnEvent(this, "schedulerecording"); QDateTime now = QDateTime::currentDateTime(); - + if (recinfo.GetRecordingStartTime() < now && recinfo.GetRecordingEndTime() > now) { @@ -257,7 +258,7 @@ void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo) qVariantFromValue(recinfo)); } } - + if (recinfo.GetRecordingRuleType() != kOverrideRecord && recinfo.GetRecordingRuleType() != kDontRecord) { @@ -270,7 +271,7 @@ void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo) { menuPopup->AddButton(tr("Edit Options"), qVariantFromValue(recinfo)); - + if (recinfo.GetRecordingRuleType() != kSingleRecord && recinfo.GetRecordingRuleType() != kFindOneRecord) { @@ -279,7 +280,7 @@ void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo) } } } - + if (recinfo.GetRecordingRuleType() == kOverrideRecord || recinfo.GetRecordingRuleType() == kDontRecord) { @@ -296,8 +297,8 @@ void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo) qVariantFromValue(recinfo)); } } - } - + } + popupStack->AddScreen(menuPopup); } else @@ -315,8 +316,9 @@ void ScheduleCommon::ShowNotRecordingDialog(const RecordingInfo& recinfo) QString message = recinfo.toString(ProgramInfo::kTitleSubtitle, " - "); message += "\n\n"; - message += toDescription( - recinfo.GetRecordingStatus(), recinfo.GetRecordingStartTime()); + message += toDescription(recinfo.GetRecordingStatus(), + recinfo.GetRecordingRuleType(), + recinfo.GetRecordingStartTime()); if (recinfo.GetRecordingStatus() == rsConflict || recinfo.GetRecordingStatus() == rsLaterShowing) @@ -454,7 +456,7 @@ void ScheduleCommon::ShowNotRecordingDialog(const RecordingInfo& recinfo) qVariantFromValue(recinfo)); } } - + popupStack->AddScreen(menuPopup); } else @@ -513,10 +515,10 @@ void ScheduleCommon::customEvent(QEvent *event) { if (!qVariantCanConvert(dce->GetData())) return; - + RecordingInfo recInfo = qVariantValue (dce->GetData()); - + if (resulttext == tr("Reactivate")) recInfo.ReactivateRecording(); else if (resulttext == tr("Stop recording")) diff --git a/mythtv/programs/mythfrontend/viewschedulediff.cpp b/mythtv/programs/mythfrontend/viewschedulediff.cpp index 04a51e2a419..367d1f2cf4f 100644 --- a/mythtv/programs/mythfrontend/viewschedulediff.cpp +++ b/mythtv/programs/mythfrontend/viewschedulediff.cpp @@ -102,8 +102,9 @@ void ViewScheduleDiff::showStatus(MythUIButtonListItem *item) QString message = pi->toString(ProgramInfo::kTitleSubtitle, " - "); message += "\n\n"; - message += toDescription( - pi->GetRecordingStatus(), pi->GetRecordingStartTime()); + message += toDescription(pi->GetRecordingStatus(), + pi->GetRecordingRuleType(), + pi->GetRecordingStartTime()); if (pi->GetRecordingStatus() == rsConflict || pi->GetRecordingStatus() == rsLaterShowing) diff --git a/mythtv/programs/mythmetadatalookup/lookup.cpp b/mythtv/programs/mythmetadatalookup/lookup.cpp index d0a5dc0d9ff..0e01b6404ba 100644 --- a/mythtv/programs/mythmetadatalookup/lookup.cpp +++ b/mythtv/programs/mythmetadatalookup/lookup.cpp @@ -342,8 +342,11 @@ void LookerUpper::customEvent(QEvent *levent) if (rule) { rule->LoadByProgram(pginfo); - if (rule->m_inetref.isEmpty()) + if (rule->m_inetref.isEmpty() && + (rule->m_searchType == kNoSearch)) + { rule->m_inetref = lookup->GetInetref(); + } rule->m_season = lookup->GetSeason(); rule->m_episode = lookup->GetEpisode(); rule->Save();