1217 | | bool enable_livetv_ui = false; |
1218 | | if (pseudoLiveTVRecording && |
1219 | | (QDateTime::currentDateTime() > recordEndTime || |
1220 | | HasFlags(kFlagFinishRecording))) |
1221 | | { |
| 1218 | #define LIVETV_END (now >= curRecording->endts) |
| 1219 | // use the following instead to test ringbuffer switching |
| 1220 | //#define LIVETV_END (now >= curRecording->recstartts.addSecs(60)) |
| 1221 | |
| 1222 | QDateTime now = QDateTime::currentDateTime(); |
| 1223 | bool has_finish = HasFlags(kFlagFinishRecording); |
| 1224 | bool has_rec = pseudoLiveTVRecording; |
| 1225 | bool rec_soon = pendingRecording; |
| 1226 | bool enable_ui = true; |
| 1227 | |
| 1228 | if (has_rec && (has_finish || (now > recordEndTime))) |
1228 | | //#define TESTING_RING_BUFFER_SWITCHING |
1229 | | #ifdef TESTING_RING_BUFFER_SWITCHING |
1230 | | if ((QDateTime::currentDateTime() >= |
1231 | | curRecording->recstartts.addSecs(60))) |
1232 | | #else |
1233 | | if ((QDateTime::currentDateTime() >= curRecording->endts)) |
1234 | | #endif |
1235 | | { |
1236 | | CheckForRecGroupChange(); |
1237 | | if (pseudoLiveTVRecording) |
1238 | | { |
1239 | | // If the last recording was flagged for keeping |
1240 | | // in the frontend, then add the recording rule |
1241 | | // so that transcode, commfrag, etc can be run. |
1242 | | recordEndTime = |
1243 | | GetRecordEndTime(pseudoLiveTVRecording); |
1244 | | NotifySchedulerOfRecording(curRecording); |
1245 | | } |
1246 | | else |
1247 | | { |
1248 | | SwitchLiveTVRingBuffer(); |
1249 | | enable_livetv_ui = true; |
1250 | | } |
1251 | | } |
1252 | | } |
1253 | | if (enable_livetv_ui) |
1254 | | { |