diff -rup mythtv-vid.old/libs/libmythtv/remoteutil.cpp mythtv-vid/libs/libmythtv/remoteutil.cpp
|
old
|
new
|
void RemoteFillProginfo(ProgramInfo *pgi
|
| 337 | 337 | pginfo->FromStringList(strlist, 0); |
| 338 | 338 | } |
| 339 | 339 | |
| 340 | | int RemoteIsRecording(void) |
| | 340 | QStringList RemoteRecordings(void) |
| 341 | 341 | { |
| 342 | 342 | QStringList strlist = "QUERY_ISRECORDING"; |
| | 343 | QStringList empty; |
| | 344 | |
| | 345 | empty << "0" << "0"; |
| 343 | 346 | |
| 344 | 347 | if (!gContext->SendReceiveStringList(strlist, false, false)) |
| 345 | | return -1; |
| | 348 | return empty; |
| 346 | 349 | |
| 347 | | return strlist[0].toInt(); |
| | 350 | return strlist; |
| 348 | 351 | } |
| 349 | 352 | |
| 350 | 353 | int RemoteGetRecordingMask(void) |
diff -rup mythtv-vid.old/libs/libmythtv/remoteutil.h mythtv-vid/libs/libmythtv/remoteutil.h
|
old
|
new
|
|
| 3 | 3 | |
| 4 | 4 | #include <vector> |
| 5 | 5 | #include <qstring.h> |
| | 6 | #include <qstringlist.h> |
| 6 | 7 | using namespace std; |
| 7 | 8 | |
| 8 | 9 | #include "mythexp.h" |
| … |
… |
MPUBLIC void RemoteGeneratePreviewPixmap
|
| 56 | 57 | MPUBLIC QString RemoteGetPreviewLastModified(ProgramInfo *pginfo); |
| 57 | 58 | MPUBLIC void RemoteFillProginfo(ProgramInfo *pginfo, |
| 58 | 59 | const QString &playbackhostname); |
| 59 | | MPUBLIC int RemoteIsRecording(void); |
| | 60 | MPUBLIC QStringList RemoteRecordings(void); |
| 60 | 61 | MPUBLIC int RemoteGetRecordingMask(void); |
| 61 | 62 | MPUBLIC int RemoteGetFreeRecorderCount(void); |
| 62 | 63 | |
diff -rup mythtv-vid.old/libs/libmythtv/xbox.cpp mythtv-vid/libs/libmythtv/xbox.cpp
|
old
|
new
|
void XBox::GetSettings(void)
|
| 22 | 22 | RecordingLED = gContext->GetSetting("XboxLEDRecording","rrrr"); |
| 23 | 23 | DefaultLED = gContext->GetSetting("XboxLEDDefault","gggg"); |
| 24 | 24 | BlinkBIN = gContext->GetSetting("XboxBlinkBIN"); |
| | 25 | LEDNonLiveTV = gContext->GetSetting("XboxLEDNonLiveTV","0"); |
| 25 | 26 | |
| 26 | 27 | if (!BlinkBIN) |
| 27 | 28 | return; |
| … |
… |
void XBox::GetSettings(void)
|
| 36 | 37 | |
| 37 | 38 | void XBox::CheckRec(void) |
| 38 | 39 | { |
| 39 | | bool recording = RemoteIsRecording(); |
| | 40 | QStringList recording = RemoteRecordings(); |
| 40 | 41 | |
| 41 | | QString color = (recording) ? RecordingLED : DefaultLED; |
| | 42 | int all = recording[0].toInt(); |
| | 43 | int livetv = recording[1].toInt(); |
| | 44 | int numrec = all; |
| | 45 | |
| | 46 | if (LEDNonLiveTV.toInt()) |
| | 47 | numrec -= livetv; |
| | 48 | |
| | 49 | QString color = (numrec) ? RecordingLED : DefaultLED; |
| 42 | 50 | |
| 43 | 51 | if (color != PhaseCache) |
| 44 | 52 | { |
diff -rup mythtv-vid.old/libs/libmythtv/xbox.h mythtv-vid/libs/libmythtv/xbox.h
|
old
|
new
|
|
| 3 | 3 | |
| 4 | 4 | #include <qobject.h> |
| 5 | 5 | #include <qtimer.h> |
| | 6 | #include <qstringlist.h> |
| 6 | 7 | |
| 7 | 8 | #include "mythexp.h" |
| 8 | 9 | |
| … |
… |
class MPUBLIC XBox : public QObject
|
| 26 | 27 | QString DefaultLED; |
| 27 | 28 | QString PhaseCache; |
| 28 | 29 | QString BlinkBIN; |
| | 30 | QString LEDNonLiveTV; |
| 29 | 31 | }; |
| 30 | 32 | |
| 31 | 33 | #endif |
diff -rup mythtv-vid.old/programs/mythbackend/mainserver.cpp mythtv-vid/programs/mythbackend/mainserver.cpp
|
old
|
new
|
void MainServer::HandleIsRecording(QStri
|
| 3511 | 3511 | |
| 3512 | 3512 | MythSocket *pbssock = pbs->getSocket(); |
| 3513 | 3513 | int RecordingsInProgress = 0; |
| | 3514 | int LiveTVRecordingsInProgress = 0; |
| | 3515 | ProgramInfo *info; |
| | 3516 | QStringList retlist; |
| | 3517 | |
| 3514 | 3518 | QMap<int, EncoderLink *>::Iterator iter = encoderList->begin(); |
| 3515 | 3519 | for (; iter != encoderList->end(); ++iter) |
| 3516 | 3520 | { |
| 3517 | 3521 | EncoderLink *elink = iter.data(); |
| 3518 | | if (elink->IsBusyRecording()) |
| 3519 | | RecordingsInProgress++; |
| | 3522 | if (elink->IsBusyRecording()) { |
| | 3523 | info = elink->GetRecording(); |
| | 3524 | |
| | 3525 | if (info->recgroup == "LiveTV") |
| | 3526 | LiveTVRecordingsInProgress++; |
| | 3527 | else |
| | 3528 | RecordingsInProgress++; |
| | 3529 | |
| | 3530 | delete info; |
| | 3531 | } |
| 3520 | 3532 | } |
| 3521 | 3533 | |
| 3522 | | QStringList retlist = QString::number(RecordingsInProgress); |
| | 3534 | retlist << QString::number(RecordingsInProgress); |
| | 3535 | retlist << QString::number(LiveTVRecordingsInProgress); |
| 3523 | 3536 | |
| 3524 | 3537 | SendResponse(pbssock, retlist); |
| 3525 | 3538 | } |
diff -rup mythtv-vid.old/programs/mythfrontend/globalsettings.cpp mythtv-vid/programs/mythfrontend/globalsettings.cpp
|
old
|
new
|
static HostComboBox *XboxLEDRecording()
|
| 3231 | 3231 | return gc; |
| 3232 | 3232 | } |
| 3233 | 3233 | |
| | 3234 | static HostCheckBox *XboxLEDNonLiveTV() |
| | 3235 | { |
| | 3236 | HostCheckBox *gc = new HostCheckBox("XboxLEDNonLiveTV"); |
| | 3237 | gc->setLabel(QObject::tr("Ignore LiveTV Recordings")); |
| | 3238 | gc->setHelpText(QObject::tr("Recording monitoring will " |
| | 3239 | "ignore LiveTV recordings.")); |
| | 3240 | gc->setValue(false); |
| | 3241 | return gc; |
| | 3242 | } |
| | 3243 | |
| 3234 | 3244 | static HostSpinBox *XboxCheckRec() |
| 3235 | 3245 | { |
| 3236 | 3246 | HostSpinBox *gs = new HostSpinBox("XboxCheckRec", 1, 600, 2); |
| … |
… |
XboxSettings::XboxSettings()
|
| 4636 | 4646 | xboxset->addChild(XboxBlinkBIN()); |
| 4637 | 4647 | xboxset->addChild(XboxLEDDefault()); |
| 4638 | 4648 | xboxset->addChild(XboxLEDRecording()); |
| | 4649 | xboxset->addChild(XboxLEDNonLiveTV()); |
| 4639 | 4650 | xboxset->addChild(XboxCheckRec()); |
| 4640 | 4651 | addChild(xboxset); |
| 4641 | 4652 | } |