summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Engel <dengel@mythtv.org>2012-12-30 20:24:34 (GMT)
committer David Engel <dengel@mythtv.org>2012-12-30 20:24:34 (GMT)
commit9497ba1b63a5a6a91b06dbb85beea37444ef3ccc (patch)
treeaa3c01fb82e8aa36e9ae6c1183835081b8ae054a
parent7c0f6b23ff0b013149b92e191290072aa7a34c1d (diff)
Add some more scheduler related simplifications.
Remove the channel record recording rule type. Add a "This channel" filter to maintain the that functionality. Automatically convert existing channel record rules to all record rules with the channel filter enabled. Add a dialog to offer common actions instead of immediately entering the schedule editor when SELECT is pressed on a non-scheduled program. Pressing the EDIT action still goes straight to the schedule editor. Change the text in the recording, not recording and not scheduled dialogs to be a little clearer. Change the behavior when RECORD is pressed in the EPG and elsewhere. Previously, this action cycled through the recrding rule types. if the program is not scheduled, this action now adds a single record rule. If the program is scheduled, it now brings up the appropriate recording or not recording dialog.
-rw-r--r--mythtv/bindings/perl/MythTV.pm2
-rw-r--r--mythtv/bindings/python/MythTV/static.py4
-rw-r--r--mythtv/libs/libmyth/programinfo.cpp9
-rw-r--r--mythtv/libs/libmyth/programinfo.h1
-rw-r--r--mythtv/libs/libmyth/recordingtypes.cpp11
-rw-r--r--mythtv/libs/libmyth/recordingtypes.h2
-rw-r--r--mythtv/libs/libmythbase/mythversion.h4
-rw-r--r--mythtv/libs/libmythtv/dbcheck.cpp14
-rw-r--r--mythtv/libs/libmythtv/recordinginfo.cpp49
-rw-r--r--mythtv/libs/libmythtv/recordinginfo.h2
-rw-r--r--mythtv/libs/libmythtv/tv_play.cpp8
-rw-r--r--mythtv/libs/libmythtv/tv_play.h2
-rw-r--r--mythtv/programs/mythbackend/scheduler.cpp23
-rw-r--r--mythtv/programs/mythfrontend/guidegrid.cpp8
-rw-r--r--mythtv/programs/mythfrontend/progfind.cpp6
-rw-r--r--mythtv/programs/mythfrontend/proglist.cpp6
-rw-r--r--mythtv/programs/mythfrontend/schedulecommon.cpp193
-rw-r--r--mythtv/programs/mythfrontend/schedulecommon.h2
-rw-r--r--mythtv/programs/mythfrontend/scheduleeditor.cpp5
19 files changed, 205 insertions, 146 deletions
diff --git a/mythtv/bindings/perl/MythTV.pm b/mythtv/bindings/perl/MythTV.pm
index 1a86c8b..6063d67 100644
--- a/mythtv/bindings/perl/MythTV.pm
+++ b/mythtv/bindings/perl/MythTV.pm
@@ -115,7 +115,7 @@ package MythTV;
# schema version supported in the main code. We need to check that the schema
# version in the database is as expected by the bindings, which are expected
# to be kept in sync with the main code.
- our $SCHEMA_VERSION = "1309";
+ our $SCHEMA_VERSION = "1310";
# NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
# the number of items in a ProgramInfo QStringList group used by
diff --git a/mythtv/bindings/python/MythTV/static.py b/mythtv/bindings/python/MythTV/static.py
index 7da4d5d..98c0448 100644
--- a/mythtv/bindings/python/MythTV/static.py
+++ b/mythtv/bindings/python/MythTV/static.py
@@ -5,7 +5,7 @@ Contains any static and global variables for MythTV Python Bindings
"""
OWN_VERSION = (0,27,-1,0)
-SCHEMA_VERSION = 1309
+SCHEMA_VERSION = 1310
NVSCHEMA_VERSION = 1007
MUSICSCHEMA_VERSION = 1018
PROTO_VERSION = '76'
@@ -39,7 +39,7 @@ class RECTYPE( object ):
kNotRecording = 0
kSingleRecord = 1
kDailyRecord = 2
- kChannelRecord = 3
+ #kChannelRecord = 3 (Obsolete)
kAllRecord = 4
kWeeklyRecord = 5
kOneRecord = 6
diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp
index e4289e4..19130eb 100644
--- a/mythtv/libs/libmyth/programinfo.cpp
+++ b/mythtv/libs/libmyth/programinfo.cpp
@@ -1731,6 +1731,15 @@ uint64_t ProgramInfo::QueryLastFrameInPosMap(void) const
return last_frame;
}
+bool ProgramInfo::IsGeneric(void) const
+{
+ return
+ (programid.isEmpty() && subtitle.isEmpty() &&
+ description.isEmpty()) ||
+ (!programid.isEmpty() && programid.endsWith("0000")
+ && catType == "series");
+}
+
QString ProgramInfo::toString(const Verbosity v, QString sep, QString grp)
const
{
diff --git a/mythtv/libs/libmyth/programinfo.h b/mythtv/libs/libmyth/programinfo.h
index dab7929..3f3e976 100644
--- a/mythtv/libs/libmyth/programinfo.h
+++ b/mythtv/libs/libmyth/programinfo.h
@@ -435,6 +435,7 @@ class MPUBLIC ProgramInfo
uint32_t GetProgramFlags(void) const { return programflags; }
ProgramInfoType GetProgramInfoType(void) const
{ return (ProgramInfoType)((programflags & FL_TYPEMASK) >> 16); }
+ bool IsGeneric(void) const;
bool IsInUsePlaying(void) const { return programflags & FL_INUSEPLAYING;}
bool IsCommercialFree(void) const { return programflags & FL_CHANCOMMFREE;}
bool HasCutlist(void) const { return programflags & FL_CUTLIST; }
diff --git a/mythtv/libs/libmyth/recordingtypes.cpp b/mythtv/libs/libmyth/recordingtypes.cpp
index 3131051..91643b9 100644
--- a/mythtv/libs/libmyth/recordingtypes.cpp
+++ b/mythtv/libs/libmyth/recordingtypes.cpp
@@ -15,8 +15,7 @@ int RecTypePrecedence(RecordingType rectype)
case kOneRecord: return 4; break;
case kWeeklyRecord: return 6; break;
case kDailyRecord: return 8; break;
- case kChannelRecord: return 9; break;
- case kAllRecord: return 10; break;
+ case kAllRecord: return 9; break;
case kTemplateRecord: return 0; break;
default: return 11;
}
@@ -29,8 +28,6 @@ QString toString(RecordingType rectype)
{
case kSingleRecord:
return QObject::tr("Single Record");
- case kChannelRecord:
- return QObject::tr("Channel Record");
case kAllRecord:
return QObject::tr("Record All");
case kOneRecord:
@@ -56,8 +53,6 @@ QString toRawString(RecordingType rectype)
{
case kSingleRecord:
return QString("Single Record");
- case kChannelRecord:
- return QString("Channel Record");
case kAllRecord:
return QString("Record All");
case kOneRecord:
@@ -80,8 +75,6 @@ RecordingType recTypeFromString(QString type)
return kNotRecording;
if (type.toLower() == "single record" || type.toLower() == "single")
return kSingleRecord;
- else if (type.toLower() == "channel record" || type.toLower() == "channel")
- return kChannelRecord;
else if (type.toLower() == "record all" || type.toLower() == "all")
return kAllRecord;
else if (type.toLower() == "record one" || type.toLower() == "one" ||
@@ -109,8 +102,6 @@ QChar toQChar(RecordingType rectype)
{
case kSingleRecord:
ret = QObject::tr("S", "RecTypeChar kSingleRecord"); break;
- case kChannelRecord:
- ret = QObject::tr("C", "RecTypeChar kChannelRecord"); break;
case kAllRecord:
ret = QObject::tr("A", "RecTypeChar kAllRecord"); break;
case kOneRecord:
diff --git a/mythtv/libs/libmyth/recordingtypes.h b/mythtv/libs/libmyth/recordingtypes.h
index 37c1400..2d3f6a2 100644
--- a/mythtv/libs/libmyth/recordingtypes.h
+++ b/mythtv/libs/libmyth/recordingtypes.h
@@ -21,7 +21,7 @@ typedef enum RecordingTypes
kNotRecording = 0,
kSingleRecord = 1,
kDailyRecord = 2,
- kChannelRecord = 3,
+ //kChannelRecord = 3, (Obsolete)
kAllRecord = 4,
kWeeklyRecord = 5,
kOneRecord = 6,
diff --git a/mythtv/libs/libmythbase/mythversion.h b/mythtv/libs/libmythbase/mythversion.h
index 2e68bb1..ce18790 100644
--- a/mythtv/libs/libmythbase/mythversion.h
+++ b/mythtv/libs/libmythbase/mythversion.h
@@ -12,7 +12,7 @@
/// Update this whenever the plug-in API changes.
/// Including changes in the libmythbase, libmyth, libmythtv, libmythav* and
/// libmythui class methods used by plug-ins.
-#define MYTH_BINARY_VERSION "0.27.20121227-1"
+#define MYTH_BINARY_VERSION "0.27.20121227-2"
/** \brief Increment this whenever the MythTV network protocol changes.
*
@@ -57,7 +57,7 @@
* mythtv/bindings/php/MythBackend.php
#endif
-#define MYTH_DATABASE_VERSION "1309"
+#define MYTH_DATABASE_VERSION "1310"
MBASE_PUBLIC const char *GetMythSourceVersion();
diff --git a/mythtv/libs/libmythtv/dbcheck.cpp b/mythtv/libs/libmythtv/dbcheck.cpp
index 6211aa2..4da5eaf 100644
--- a/mythtv/libs/libmythtv/dbcheck.cpp
+++ b/mythtv/libs/libmythtv/dbcheck.cpp
@@ -2325,6 +2325,20 @@ NULL
return false;
}
+ if (dbver == "1309")
+ {
+ const char *updates[] = {
+// Add this channel filter
+"REPLACE INTO recordfilter (filterid, description, clause, newruledefault) "
+" VALUES (10, 'This channel', 'channel.callsign = RECTABLE.station', 0)",
+// Convert old, Channel rules to All with channel filter
+"UPDATE record SET type = 4, filter = filter|1024 WHERE type = 3",
+NULL
+};
+ if (!performActualUpdate(&updates[0], "1310", dbver))
+ return false;
+ }
+
return true;
}
diff --git a/mythtv/libs/libmythtv/recordinginfo.cpp b/mythtv/libs/libmythtv/recordinginfo.cpp
index 1aa7cd6..af610f6 100644
--- a/mythtv/libs/libmythtv/recordinginfo.cpp
+++ b/mythtv/libs/libmythtv/recordinginfo.cpp
@@ -766,53 +766,14 @@ void RecordingInfo::ApplyTranscoderProfileChange(const QString &profile) const
}
}
-/** \fn RecordingInfo::ToggleRecord(void)
- * \brief Cycles through recording types.
- *
- * If the program recording status is kNotRecording,
- * ApplyRecordStateChange(kSingleRecord) is called.
- * If the program recording status is kSingleRecording,
- * ApplyRecordStateChange(kOneRecord) is called.
- * <br>etc...
- *
- * The states in order are: kNotRecording, kSingleRecord, kOneRecord,
- * kWeeklyRecord, kDailyRecord, kChannelRecord, kAllRecord.<br>
- * And: kOverrideRecord, kDontRecord.
- *
- * That is if you the recording is in any of the first set of states,
- * we cycle through those, if not we toggle between kOverrideRecord and
- * kDontRecord.
+/** \fn RecordingInfo::QuickRecord(void)
+ * \brief Create a kSingleRecord if not already scheduled.
*/
-void RecordingInfo::ToggleRecord(void)
+void RecordingInfo::QuickRecord(void)
{
RecordingType curType = GetProgramRecordingStatus();
-
- switch (curType)
- {
- case kNotRecording:
- ApplyRecordStateChange(kSingleRecord);
- break;
- case kSingleRecord:
- ApplyRecordStateChange(kOneRecord);
- break;
- case kOneRecord:
- ApplyRecordStateChange(kAllRecord);
- break;
- case kAllRecord:
- ApplyRecordStateChange(kSingleRecord);
- break;
-
- case kOverrideRecord:
- ApplyRecordStateChange(kDontRecord);
- break;
- case kDontRecord:
- ApplyRecordStateChange(kOverrideRecord);
- break;
-
- default:
- ApplyRecordStateChange(kAllRecord);
- break;
- }
+ if (curType == kNotRecording)
+ ApplyRecordStateChange(kSingleRecord);
}
/**
diff --git a/mythtv/libs/libmythtv/recordinginfo.h b/mythtv/libs/libmythtv/recordinginfo.h
index f27d02e..c775e71 100644
--- a/mythtv/libs/libmythtv/recordinginfo.h
+++ b/mythtv/libs/libmythtv/recordinginfo.h
@@ -220,7 +220,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
QString GetProgramRecordingProfile(void) const;
void ApplyRecordStateChange(RecordingType newstate, bool save = true);
void ApplyRecordRecPriorityChange(int);
- void ToggleRecord(void);
+ void QuickRecord(void);
// Used in determining start and end for RecordingQuality determination
void SetDesiredStartTime(const QDateTime &dt) { desiredrecstartts = dt; }
diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
index 57f900d..47a2cef 100644
--- a/mythtv/libs/libmythtv/tv_play.cpp
+++ b/mythtv/libs/libmythtv/tv_play.cpp
@@ -3901,7 +3901,7 @@ bool TV::BrowseHandleAction(PlayerContext *ctx, const QStringList &actions)
browsehelper->BrowseEnd(ctx, false);
}
else if (has_action(ACTION_TOGGLERECORD, actions))
- ToggleRecord(ctx);
+ QuickRecord(ctx);
else
{
handled = false;
@@ -4481,7 +4481,7 @@ bool TV::ToggleHandleAction(PlayerContext *ctx,
else if (has_action(ACTION_TOGGLESLEEP, actions))
ToggleSleepTimer(ctx);
else if (has_action(ACTION_TOGGLERECORD, actions) && islivetv)
- ToggleRecord(ctx);
+ QuickRecord(ctx);
else if (has_action(ACTION_TOGGLEFAV, actions) && islivetv)
ToggleChannelFavorite(ctx);
else if (has_action(ACTION_TOGGLECHANCONTROLS, actions) && islivetv)
@@ -9487,7 +9487,7 @@ void TV::customEvent(QEvent *e)
}
}
-void TV::ToggleRecord(PlayerContext *ctx)
+void TV::QuickRecord(PlayerContext *ctx)
{
BrowseInfo bi = browsehelper->GetBrowsedInfo();
if (bi.m_chanid)
@@ -9498,7 +9498,7 @@ void TV::ToggleRecord(PlayerContext *ctx)
RecordingInfo::LoadStatus status;
RecordingInfo recinfo(bi.m_chanid, startts, false, 0, &status);
if (RecordingInfo::kFoundProgram == status)
- recinfo.ToggleRecord();
+ recinfo.QuickRecord();
recinfo.ToMap(infoMap);
infoMap["iconpath"] = ChannelUtil::GetIcon(recinfo.GetChanID());
if ((recinfo.IsVideoFile() || recinfo.IsVideoDVD() ||
diff --git a/mythtv/libs/libmythtv/tv_play.h b/mythtv/libs/libmythtv/tv_play.h
index 175bb98..9584593 100644
--- a/mythtv/libs/libmythtv/tv_play.h
+++ b/mythtv/libs/libmythtv/tv_play.h
@@ -317,7 +317,7 @@ class MTV_PUBLIC TV : public QObject
// Other toggles
void ToggleAutoExpire(PlayerContext*);
- void ToggleRecord(PlayerContext*);
+ void QuickRecord(PlayerContext*);
// General TV state
static bool StateIsRecording(TVState state);
diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
index 0e99c88..2a3bdec 100644
--- a/mythtv/programs/mythbackend/scheduler.cpp
+++ b/mythtv/programs/mythbackend/scheduler.cpp
@@ -3559,29 +3559,24 @@ void Scheduler::UpdateMatches(uint recordid, uint sourceid, uint mplexid,
QString(" AND channel.visible = 1 ") +
filterClause + QString(" AND "
-"((RECTABLE.type = %1 " // all record
+"("
+" (RECTABLE.type = %1 " // all record
" OR RECTABLE.type = %2 " // one record
" OR RECTABLE.type = %3 " // daily record
" OR RECTABLE.type = %4) " // weekly record
" OR "
-" ((RECTABLE.station = channel.callsign) " // channel matches
-" AND "
-" ((RECTABLE.type = %5) " // channel record
-" OR"
-" ((ADDTIME(RECTABLE.startdate, RECTABLE.starttime) = program.starttime) " // date/time matches
-" AND "
-" (RECTABLE.type = %6 "
-" OR RECTABLE.type = %7 "
-" OR RECTABLE.type = %8)" // single/override/don't record
-" )"
-" )"
-" )"
+" ((RECTABLE.type = %6 " // single record
+" OR RECTABLE.type = %7 " // override record
+" OR RECTABLE.type = %8)" // don't record
+" AND "
+" ADDTIME(RECTABLE.startdate, RECTABLE.starttime) = program.starttime " // date/time matches
+" AND "
+" RECTABLE.station = channel.callsign) " // channel matches
") ")
.arg(kAllRecord)
.arg(kOneRecord)
.arg(kDailyRecord)
.arg(kWeeklyRecord)
- .arg(kChannelRecord)
.arg(kSingleRecord)
.arg(kOverrideRecord)
.arg(kDontRecord);
diff --git a/mythtv/programs/mythfrontend/guidegrid.cpp b/mythtv/programs/mythfrontend/guidegrid.cpp
index 3ee060b..5a0aa44 100644
--- a/mythtv/programs/mythfrontend/guidegrid.cpp
+++ b/mythtv/programs/mythfrontend/guidegrid.cpp
@@ -1303,9 +1303,6 @@ void GuideGrid::fillProgramRowInfos(unsigned int row, bool useExistingData)
case kDailyRecord:
recFlag = 2;
break;
- case kChannelRecord:
- recFlag = 3;
- break;
case kAllRecord:
recFlag = 4;
break;
@@ -1983,10 +1980,7 @@ void GuideGrid::quickRecord()
if (pginfo->GetTitle() == kUnknownTitle)
return;
- RecordingInfo ri(*pginfo);
- ri.ToggleRecord();
- *pginfo = ri;
-
+ QuickRecord(pginfo);
LoadFromScheduler(m_recList);
fillProgramInfos();
updateInfo();
diff --git a/mythtv/programs/mythfrontend/progfind.cpp b/mythtv/programs/mythfrontend/progfind.cpp
index 28c45c1..16baf4a 100644
--- a/mythtv/programs/mythfrontend/progfind.cpp
+++ b/mythtv/programs/mythfrontend/progfind.cpp
@@ -415,11 +415,7 @@ void ProgFinder::getInfo(bool toggle)
if (curPick)
{
if (toggle)
- {
- RecordingInfo ri(*curPick);
- ri.ToggleRecord();
- *curPick = ri;
- }
+ QuickRecord(curPick);
else
EditRecording(curPick);
}
diff --git a/mythtv/programs/mythfrontend/proglist.cpp b/mythtv/programs/mythfrontend/proglist.cpp
index 11ee744..9c012b3 100644
--- a/mythtv/programs/mythfrontend/proglist.cpp
+++ b/mythtv/programs/mythfrontend/proglist.cpp
@@ -608,11 +608,7 @@ void ProgLister::RecordSelected(void)
{
ProgramInfo *pi = GetCurrent();
if (pi)
- {
- RecordingInfo ri(*pi);
- ri.ToggleRecord();
- *pi = ri;
- }
+ QuickRecord(pi);
}
void ProgLister::HandleClicked(void)
diff --git a/mythtv/programs/mythfrontend/schedulecommon.cpp b/mythtv/programs/mythfrontend/schedulecommon.cpp
index b03e920..7e9d4e2 100644
--- a/mythtv/programs/mythfrontend/schedulecommon.cpp
+++ b/mythtv/programs/mythfrontend/schedulecommon.cpp
@@ -99,6 +99,24 @@ void ScheduleCommon::ShowUpcomingScheduled(ProgramInfo *pginfo) const
}
/**
+* \brief Create a kSingleRecord or bring up recording dialog.
+*/
+void ScheduleCommon::QuickRecord(ProgramInfo *pginfo)
+{
+ if (!pginfo)
+ return;
+
+ if (pginfo->GetRecordingRuleID())
+ EditRecording(pginfo);
+ else
+ {
+ RecordingInfo ri(*pginfo);
+ ri.QuickRecord();
+ *pginfo = ri;
+ }
+}
+
+/**
* \brief Creates a dialog for editing the recording status,
* blocking until user leaves dialog.
*/
@@ -110,7 +128,7 @@ void ScheduleCommon::EditRecording(ProgramInfo *pginfo)
RecordingInfo ri(*pginfo);
if (!ri.GetRecordingRuleID())
- EditScheduled(&ri);
+ ShowNotScheduledDialog(ri);
else if (ri.GetRecordingStatus() <= rsWillRecord ||
ri.GetRecordingStatus() == rsOtherShowing)
ShowRecordingDialog(ri);
@@ -219,10 +237,10 @@ void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo)
recinfo.GetRecordingStatus() != rsTuning &&
recinfo.GetRecordingStatus() != rsOtherRecording &&
recinfo.GetRecordingStatus() != rsOtherTuning)
- menuPopup->AddButton(tr("Reactivate"),
+ menuPopup->AddButton(tr("Restart recording this showing"),
qVariantFromValue(recinfo));
else
- menuPopup->AddButton(tr("Stop recording"),
+ menuPopup->AddButton(tr("Stop recording this showing"),
qVariantFromValue(recinfo));
}
@@ -233,7 +251,7 @@ void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo)
{
if (recinfo.GetRecordingStartTime() > now)
{
- menuPopup->AddButton(tr("Don't record"),
+ menuPopup->AddButton(tr("Don't record this showing"),
qVariantFromValue(recinfo));
}
@@ -261,7 +279,7 @@ void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo)
(!recinfo.GetSubtitle().isEmpty() ||
!recinfo.GetDescription().isEmpty())) ))
{
- menuPopup->AddButton(tr("Never record"),
+ menuPopup->AddButton(tr("Never record this episode"),
qVariantFromValue(recinfo));
}
}
@@ -274,20 +292,17 @@ void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo)
recinfo.GetRecordingStatus() == rsOtherRecording ||
recinfo.GetRecordingStatus() == rsOtherTuning)
{
- menuPopup->AddButton(tr("Modify Recording Options"),
+ menuPopup->AddButton(tr("Edit options for this showing"),
qVariantFromValue(recinfo));
}
else
{
- menuPopup->AddButton(tr("Edit Options"),
- qVariantFromValue(recinfo));
-
- if (recinfo.GetRecordingRuleType() != kSingleRecord &&
- recinfo.GetRecordingRuleType() != kOneRecord)
+ if (recinfo.GetRecordingRuleType() != kSingleRecord)
{
- menuPopup->AddButton(tr("Add Override"),
+ menuPopup->AddButton(tr("Override this showing with options"),
qVariantFromValue(recinfo));
}
+
}
}
@@ -299,19 +314,28 @@ void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo)
recinfo.GetRecordingStatus() == rsOtherRecording ||
recinfo.GetRecordingStatus() == rsOtherTuning)
{
- menuPopup->AddButton(tr("Modify Recording Options"),
+ menuPopup->AddButton(tr("Edit options for this showing"),
qVariantFromValue(recinfo));
}
else
{
- menuPopup->AddButton(tr("Edit Override"),
+ menuPopup->AddButton(tr("Edit override options"),
qVariantFromValue(recinfo));
- menuPopup->AddButton(tr("Clear Override"),
+ menuPopup->AddButton(tr("Delete override rule"),
qVariantFromValue(recinfo));
}
}
}
+ if (recinfo.GetRecordingRuleType() != kOverrideRecord &&
+ recinfo.GetRecordingRuleType() != kDontRecord)
+ {
+ menuPopup->AddButton(tr("Edit recording options"),
+ qVariantFromValue(recinfo));
+ menuPopup->AddButton(tr("Delete recording rule"),
+ qVariantFromValue(recinfo));
+ }
+
popupStack->AddScreen(menuPopup);
}
else
@@ -382,7 +406,7 @@ void ScheduleCommon::ShowNotRecordingDialog(const RecordingInfo& recinfo)
(recinfo.GetRecordingStatus() != rsDontRecord) &&
(recinfo.GetRecordingStatus() != rsNotListed))
{
- menuPopup->AddButton(tr("Reactivate"),
+ menuPopup->AddButton(tr("Restart recording this showing"),
qVariantFromValue(recinfo));
}
@@ -399,12 +423,12 @@ void ScheduleCommon::ShowNotRecordingDialog(const RecordingInfo& recinfo)
recinfo.GetRecordingStatus() == rsInactive ||
recinfo.GetRecordingStatus() == rsLaterShowing))
{
- menuPopup->AddButton(tr("Record anyway"),
+ menuPopup->AddButton(tr("Record this showing anyway"),
qVariantFromValue(recinfo));
if (recinfo.GetRecordingStatus() == rsPreviousRecording ||
recinfo.GetRecordingStatus() == rsNeverRecord)
{
- menuPopup->AddButton(tr("Forget Previous"),
+ menuPopup->AddButton(tr("Forget previous recording"),
qVariantFromValue(recinfo));
}
}
@@ -420,7 +444,7 @@ void ScheduleCommon::ShowNotRecordingDialog(const RecordingInfo& recinfo)
{
if (recinfo.GetRecordingStartTime() > now)
{
- menuPopup->AddButton(tr("Don't record"),
+ menuPopup->AddButton(tr("Don't record this showing"),
qVariantFromValue(recinfo));
}
@@ -444,29 +468,31 @@ void ScheduleCommon::ShowNotRecordingDialog(const RecordingInfo& recinfo)
(!recinfo.GetSubtitle().isEmpty() ||
!recinfo.GetDescription().isEmpty())) ))
{
- menuPopup->AddButton(tr("Never record"),
+ menuPopup->AddButton(tr("Never record this episode"),
qVariantFromValue(recinfo));
}
}
- menuPopup->AddButton(tr("Edit Options"),
- qVariantFromValue(recinfo));
-
if (recinfo.GetRecordingRuleType() != kSingleRecord &&
recinfo.GetRecordingRuleType() != kOneRecord &&
recinfo.GetRecordingStatus() != rsNotListed)
{
- menuPopup->AddButton(tr("Add Override"),
+ menuPopup->AddButton(tr("Override this showing with options"),
qVariantFromValue(recinfo));
}
+
+ menuPopup->AddButton(tr("Edit recording options"),
+ qVariantFromValue(recinfo));
+ menuPopup->AddButton(tr("Delete recording rule"),
+ qVariantFromValue(recinfo));
}
if (recinfo.GetRecordingRuleType() == kOverrideRecord ||
recinfo.GetRecordingRuleType() == kDontRecord)
{
- menuPopup->AddButton(tr("Edit Override"),
+ menuPopup->AddButton(tr("Edit override options"),
qVariantFromValue(recinfo));
- menuPopup->AddButton(tr("Clear Override"),
+ menuPopup->AddButton(tr("Delete override rule"),
qVariantFromValue(recinfo));
}
}
@@ -477,6 +503,52 @@ void ScheduleCommon::ShowNotRecordingDialog(const RecordingInfo& recinfo)
delete menuPopup;
}
+/**
+* \brief Creates a dialog displaying current recording status and options
+* available
+*/
+void ScheduleCommon::ShowNotScheduledDialog(const RecordingInfo& recinfo)
+{
+ QString message = recinfo.toString(ProgramInfo::kTitleSubtitle, " - ");
+
+ message += "\n\n";
+ message += toDescription(recinfo.GetRecordingStatus(),
+ recinfo.GetRecordingRuleType(),
+ recinfo.GetRecordingStartTime());
+
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythDialogBox *menuPopup = new MythDialogBox(message, popupStack,
+ "notSchedOptionPopup", true);
+
+ if (menuPopup->Create())
+ {
+ menuPopup->SetReturnEvent(this, "schedulenotscheduled");
+
+ QDateTime now = MythDate::current();
+
+ if (recinfo.GetRecordingEndTime() > now)
+ menuPopup->AddButton(tr("Record only this showing"),
+ qVariantFromValue(recinfo));
+
+ menuPopup->AddButton(tr("Record all showings"),
+ qVariantFromValue(recinfo));
+
+ if (!recinfo.IsGeneric())
+ menuPopup->AddButton(tr("Record one showing of this episode"),
+ qVariantFromValue(recinfo));
+
+ menuPopup->AddButton(tr("Record all showings on this channel"),
+ qVariantFromValue(recinfo));
+
+ menuPopup->AddButton(tr("Record with more options"),
+ qVariantFromValue(recinfo));
+
+ popupStack->AddScreen(menuPopup);
+ }
+ else
+ delete menuPopup;
+}
+
void ScheduleCommon::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
@@ -486,7 +558,36 @@ void ScheduleCommon::customEvent(QEvent *event)
QString resultid = dce->GetId();
QString resulttext = dce->GetResultText();
- if (resultid == "schedulenotrecording")
+ if (resultid == "schedulenotscheduled")
+ {
+ if (!qVariantCanConvert<RecordingInfo>(dce->GetData()))
+ return;
+
+ RecordingInfo recInfo = qVariantValue<RecordingInfo>
+ (dce->GetData());
+
+ if (resulttext == tr("Record only this showing"))
+ recInfo.ApplyRecordStateChange(kSingleRecord);
+ else if (resulttext == tr("Record all showings"))
+ recInfo.ApplyRecordStateChange(kAllRecord);
+ else if (resulttext == tr("Record one showing of this episode"))
+ {
+ recInfo.ApplyRecordStateChange(kOneRecord, false);
+ recInfo.GetRecordingRule()->m_filter |= 64; // This episode
+ recInfo.GetRecordingRule()->Save();
+ }
+ else if (resulttext == tr("Record all showings on this channel"))
+ {
+ recInfo.ApplyRecordStateChange(kAllRecord, false);
+ recInfo.GetRecordingRule()->m_filter |= 1024; // This channel
+ recInfo.GetRecordingRule()->Save();
+ }
+ else if (resulttext == tr("Record with more options"))
+ {
+ EditScheduled(&recInfo);
+ }
+ }
+ else if (resultid == "schedulenotrecording")
{
if (!qVariantCanConvert<RecordingInfo>(dce->GetData()))
return;
@@ -494,33 +595,34 @@ void ScheduleCommon::customEvent(QEvent *event)
RecordingInfo recInfo = qVariantValue<RecordingInfo>
(dce->GetData());
- if (resulttext == tr("Reactivate"))
+ if (resulttext == tr("Restart recording this showing"))
recInfo.ReactivateRecording();
- else if (resulttext == tr("Record anyway"))
+ else if (resulttext == tr("Record this showing anyway"))
{
recInfo.ApplyRecordStateChange(kOverrideRecord);
if (recInfo.GetRecordingStartTime() < MythDate::current())
recInfo.ReactivateRecording();
}
- else if (resulttext == tr("Forget Previous"))
+ else if (resulttext == tr("Forget previous recording"))
recInfo.ForgetHistory();
- else if (resulttext == tr("Don't record"))
+ else if (resulttext == tr("Don't record this showing"))
recInfo.ApplyRecordStateChange(kDontRecord);
- else if (resulttext == tr("Never record"))
+ else if (resulttext == tr("Never record this episode"))
{
recInfo.SetRecordingStatus(rsNeverRecord);
recInfo.SetScheduledStartTime(MythDate::current());
recInfo.SetScheduledEndTime(recInfo.GetRecordingStartTime());
recInfo.AddHistory(true, true);
}
- else if (resulttext == tr("Clear Override"))
+ else if (resulttext == tr("Delete override rule") ||
+ resulttext == tr("Delete recording rule"))
recInfo.ApplyRecordStateChange(kNotRecording);
- else if (resulttext == tr("Edit Override") ||
- resulttext == tr("Edit Options"))
+ else if (resulttext == tr("Edit override options") ||
+ resulttext == tr("Edit recording options"))
{
EditScheduled(&recInfo);
}
- else if (resulttext == tr("Add Override"))
+ else if (resulttext == tr("Override this showing with options"))
{
MakeOverride(&recInfo);
}
@@ -533,27 +635,28 @@ void ScheduleCommon::customEvent(QEvent *event)
RecordingInfo recInfo = qVariantValue<RecordingInfo>
(dce->GetData());
- if (resulttext == tr("Reactivate"))
+ if (resulttext == tr("Restart recording this showing"))
recInfo.ReactivateRecording();
- else if (resulttext == tr("Stop recording"))
+ else if (resulttext == tr("Stop recording this showing"))
{
ProgramInfo pginfo(
recInfo.GetChanID(), recInfo.GetRecordingStartTime());
if (pginfo.GetChanID())
RemoteStopRecording(&pginfo);
}
- else if (resulttext == tr("Don't record"))
+ else if (resulttext == tr("Don't record this showing"))
recInfo.ApplyRecordStateChange(kDontRecord);
- else if (resulttext == tr("Never record"))
+ else if (resulttext == tr("Never record this episode"))
{
recInfo.SetRecordingStatus(rsNeverRecord);
recInfo.SetScheduledStartTime(MythDate::current());
recInfo.SetScheduledEndTime(recInfo.GetRecordingStartTime());
recInfo.AddHistory(true, true);
}
- else if (resulttext == tr("Clear Override"))
+ else if (resulttext == tr("Delete override rule") ||
+ resulttext == tr("Delete recording rule"))
recInfo.ApplyRecordStateChange(kNotRecording);
- else if (resulttext == tr("Modify Recording Options"))
+ else if (resulttext == tr("Edit options for this showing"))
{
if (recInfo.GetRecordingRuleType() == kSingleRecord ||
recInfo.GetRecordingRuleType() == kOverrideRecord ||
@@ -562,12 +665,12 @@ void ScheduleCommon::customEvent(QEvent *event)
else
MakeOverride(&recInfo, true);
}
- else if (resulttext == tr("Edit Override") ||
- resulttext == tr("Edit Options"))
+ else if (resulttext == tr("Edit override options") ||
+ resulttext == tr("Edit recording options"))
{
EditScheduled(&recInfo);
}
- else if (resulttext == tr("Add Override"))
+ else if (resulttext == tr("Override this showing with options"))
{
MakeOverride(&recInfo);
}
diff --git a/mythtv/programs/mythfrontend/schedulecommon.h b/mythtv/programs/mythfrontend/schedulecommon.h
index 3f348f3..4e580e5 100644
--- a/mythtv/programs/mythfrontend/schedulecommon.h
+++ b/mythtv/programs/mythfrontend/schedulecommon.h
@@ -25,6 +25,7 @@ class ScheduleCommon : public MythScreenType
void ShowUpcoming(const QString &title, const QString &seriesid) const;
void ShowUpcoming(ProgramInfo *pginfo) const;
void ShowUpcomingScheduled(ProgramInfo *pginfo) const;
+ void QuickRecord(ProgramInfo *pginfo);
void EditRecording(ProgramInfo *pginfo);
void EditScheduled(ProgramInfo *pginfo);
void EditScheduled(RecordingInfo *recinfo);
@@ -32,6 +33,7 @@ class ScheduleCommon : public MythScreenType
void MakeOverride(RecordingInfo *recinfo, bool startActive = false);
void ShowRecordingDialog(const RecordingInfo &recinfo);
void ShowNotRecordingDialog(const RecordingInfo &recinfo);
+ void ShowNotScheduledDialog(const RecordingInfo &recinfo);
virtual void customEvent(QEvent*);
diff --git a/mythtv/programs/mythfrontend/scheduleeditor.cpp b/mythtv/programs/mythfrontend/scheduleeditor.cpp
index cdd3372..c4e42c3 100644
--- a/mythtv/programs/mythfrontend/scheduleeditor.cpp
+++ b/mythtv/programs/mythfrontend/scheduleeditor.cpp
@@ -54,6 +54,7 @@ static QString fs6(QT_TRANSLATE_NOOP("SchedFilterEditor", "This episode"));
static QString fs7(QT_TRANSLATE_NOOP("SchedFilterEditor", "This series"));
static QString fs8(QT_TRANSLATE_NOOP("SchedFilterEditor", "This time"));
static QString fs9(QT_TRANSLATE_NOOP("SchedFilterEditor", "This day and time"));
+static QString fs10(QT_TRANSLATE_NOOP("SchedFilterEditor", "This channel"));
void *ScheduleEditor::RunScheduleEditor(ProgramInfo *proginfo, void *player)
{
@@ -296,10 +297,6 @@ void ScheduleEditor::Load()
new MythUIButtonListItem(m_rulesList,
tr("Record one showing every day"),
ENUM_TO_QVARIANT(kDailyRecord));
- if (hasChannel && !isManual)
- new MythUIButtonListItem(m_rulesList,
- tr("Record all showings on this channel"),
- ENUM_TO_QVARIANT(kChannelRecord));
if (!isManual)
new MythUIButtonListItem(m_rulesList,
("Record all showings"),