[mythtv-users] [PATCH] Added Recording "Under" Time to enable to start recordings early

Tako Schotanus quintesse at palacio-cristal.com
Sat Jun 28 18:14:37 EDT 2003


Skipped content of type multipart/alternative-------------- next part --------------
? preroll.patch
Index: programs/mythbackend/scheduler.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythbackend/scheduler.cpp,v
retrieving revision 1.28
diff -r1.28 scheduler.cpp
1010a1011,1014
>         // Determine if the user wants us to start recording early
>         // and by how many seconds
>         int prerollseconds = gContext->GetNumSetting("RecordPreRoll");
> 
1016,1025c1020
<             nextrectime = nextRecording->startts;
<             secsleft = curtime.secsTo(nextrectime);
< 
<             bool recording = nextRecording->recording;
< 
< //            VERBOSE(secsleft << " seconds until " << nextRecording->title);
< 
<             if (secsleft > 35)
<                 break;
< 
---
>             // Determine the card we're going to use for recording
1034a1030,1047
>             bool recording = nextRecording->recording;
> 
>             // Determine the number of seconds left to the start of the program
>             nextrectime = nextRecording->startts;
>             secsleft = curtime.secsTo(nextrectime);
>             if (recording && !nexttv->isBusy())
>             {
>                 // Will use pre-roll settings only if no other
>                 // program is currently being recorded
>                 secsleft -= prerollseconds;
>             }
> 
> //            VERBOSE(secsleft << " seconds until " << nextRecording->title);
> 
>             if (secsleft > 35)
>                 break;
> 
>             // Check if the user is using the card to watch life TV
1037a1051
>                 // If so ask for permission to take over the card
1046a1061
>             // Check if time is up and we're supposed to be recording
1048a1064
>                 // Did the user approve us taking over the card?
1051a1068
>                     // If not we keep waiting
1056a1074
>                     // If so we start recording
1069a1088
>             // Check if time is up and the scheduled recording was deactivated
1071a1091
>                 // If so we remove it
Index: programs/mythfrontend/globalsettings.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/globalsettings.cpp,v
retrieving revision 1.74
diff -r1.74 globalsettings.cpp
215a216,225
> class RecordPreRoll: public SpinBoxSetting, public GlobalSetting {
> public:
>     RecordPreRoll():
>         SpinBoxSetting(0, 600, 1),
>         GlobalSetting("RecordPreRoll") {
>         setLabel("Time to record before start of show (in seconds)");
>         setValue(0);
>     };
> };
> 
920a931
>     general->addChild(new RecordPreRoll());


More information about the mythtv-users mailing list