[mythtv-commits] Ticket #11152: In Frontend/PlayRecording format of startime passed to network control is not as network control expects
MythTV
noreply at mythtv.org
Sun Oct 7 11:37:56 UTC 2012
#11152: In Frontend/PlayRecording format of startime passed to network control is
not as network control expects
---------------------------------+--------------------------------------
Reporter: stephengrobertson@… | Type: Bug Report - General
Status: new | Priority: minor
Milestone: unknown | Component: MythTV - General
Version: 0.26 | Severity: medium
Keywords: | Ticket locked: 0
---------------------------------+--------------------------------------
http://192.168.0.3:6547/Frontend/PlayRecording?ChanId=9700&StartTime=2012-10-07T05:05:00Z
returns <bool>true</bool> but the recording does not play.
Frontend log gives
Oct 7 11:49:48 bressay mythfrontend[19646]: I HttpServer59
services/frontend.cpp:132 (PlayRecording) Frontend API: PlayRecording,
ChanID: 9700 StartTime: 2012-10-07T05:05:00Z
Oct 7 11:49:48 bressay mythfrontend[19646]: I CoreContext
playbackbox.cpp:3696 (processNetworkControlCommand) PlaybackBox:
NetworkControl: Trying to PLAY program '9700' @ '20121007060500'
Using netcat
play program 9700 2012007060500
gives
ERROR: You are in playbackbox mode and this command is only for playback
mode
play program 9700 2012-10-07T05:05:00Z
gives
ERROR: You are in playbackbox mode and this command is only for playback
mode
but removing the 'Z'
play program 9700 2012-10-07T05:05:00
works
My guess at what is happening( could be completely wrong!)
In services/frontend.cpp Frontend::PlayRecording() builds the message as
follows:
QString message = QString("NETWORK_CONTROL PLAY PROGRAM %1 %2 %3")
.arg(ChanID)
.arg(starttime.toLocalTime().toString("yyyyMMddhhmmss"))
.arg("12345");
In networkcontrol.cpp NetworkControl::processPlay()
else if ((nc->getArgCount() >= 4) &&
(is_abbrev("program", nc->getArg(1))) &&
(nc->getArg(2).contains(QRegExp("^\\d+$"))) &&
(nc->getArg(3).contains(QRegExp(
"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d$"))))
fails and we fall through to
else if (GetMythUI()->GetCurrentLocation().toLower() != "playback")
{
return QString("ERROR: You are in %1 mode and this command is only
"
"for playback mode")
.arg(GetMythUI()->GetCurrentLocation());
}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11152>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list