John Patrick Poet wrote:
This is essentially the same patch I submitted a while back, but with
a copy/paste error fixed.
This patch allows a user to specify that shows of a given category
should be auto extended, if doing so does not cause a schedule
conflict. I use this for "Sports event".
John
I noticed that this patch no longer applies cleanly to the latest CVS.
Attached is an updated version would does.
John
Index: libs/libmythtv/tv_rec.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/tv_rec.cpp,v
retrieving revision 1.188
diff -d -u -r1.188 tv_rec.cpp
--- libs/libmythtv/tv_rec.cpp 27 May 2005 14:45:45 -0000 1.188
+++ libs/libmythtv/tv_rec.cpp 28 May 2005 17:15:42 -0000
@@ -304,12 +304,22 @@
if (internalState == kState_None)
{
- overrecordseconds = gContext->GetNumSetting("RecordOverTime");
-
outputFilename = rcinfo->GetRecordFilename(recprefix);
recordEndTime = rcinfo->recendts;
curRecording = new ProgramInfo(*rcinfo);
+ if (curRecording->category ==
+ gContext->GetSetting("OverTimeCategory"))
+ {
+ overrecordseconds = gContext->GetNumSetting("CategoryOverTime")
+ * 60;
+ VERBOSE(VB_RECORD, QString("Show category \"%1\", "
+ "desired postroll %2")
+ .arg(curRecording->category).arg(overrecordseconds));
+ }
+ else
+ overrecordseconds = gContext->GetNumSetting("RecordOverTime");
+
nextState = kState_RecordingOnly;
changeState = true;
retval = 1;
Index: programs/mythfrontend/globalsettings.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/globalsettings.cpp,v
retrieving revision 1.254
diff -d -u -r1.254 globalsettings.cpp
--- programs/mythfrontend/globalsettings.cpp 28 May 2005 00:48:30 -0000 1.254
+++ programs/mythfrontend/globalsettings.cpp 28 May 2005 17:15:42 -0000
@@ -609,6 +609,45 @@
return bs;
}
+static GlobalLineEdit *OverTimeCategory()
+{
+ GlobalLineEdit *ge = new GlobalLineEdit("OverTimeCategory");
+ ge->setLabel(QObject::tr("Category of shows to be extended"));
+ ge->setValue("Sports event");
+ ge->setHelpText(QObject::tr("For a special category (e.g. "
+ "\"Sports event\"), request that shows "
+ "be autoextended. Only works if a "
+ "shows category can be determined."));
+ return ge;
+}
+
+static GlobalSpinBox *CategoryOverTime()
+{
+ GlobalSpinBox *bs = new GlobalSpinBox("CategoryOverTime",
+ 0, 180, 60, true);
+ bs->setLabel(QObject::tr("Record past end of show (in minutes)"));
+ bs->setValue(0);
+ bs->setHelpText(QObject::tr("For the specified category, an attempt "
+ "will be made to extend the recording "
+ "by the specified time. It is ignored "
+ "when two shows have been scheduled "
+ "without enough time in between."));
+ return bs;
+}
+
+class CategoryOverTimeSettings: public VerticalConfigurationGroup {
+public:
+ CategoryOverTimeSettings():
+ VerticalConfigurationGroup(false, false) {
+ setLabel(QObject::tr("Category record over-time"));
+ setUseLabel(true);
+ Setting *overtimecategory = OverTimeCategory();
+ addChild(overtimecategory);
+ Setting *categoryovertime = CategoryOverTime();
+ addChild(categoryovertime);
+ }
+};
+
static HostCheckBox *PlayBoxOrdering()
{
HostCheckBox *gc = new HostCheckBox("PlayBoxOrdering");
@@ -3001,6 +3040,7 @@
general2->addChild(AutoExpireExtraSpace());
general2->addChild(RecordPreRoll());
general2->addChild(RecordOverTime());
+ general2->addChild(new CategoryOverTimeSettings());
general2->addChild(ATSCCheckSignalThreshold());
general2->addChild(ATSCCheckSignalWait());
general2->addChild(HDRingbufferSize());
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev