diff options
Diffstat (limited to 'pages/switch_channel.ecpp')
-rw-r--r-- | pages/switch_channel.ecpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/pages/switch_channel.ecpp b/pages/switch_channel.ecpp index 501715e..a777fc1 100644 --- a/pages/switch_channel.ecpp +++ b/pages/switch_channel.ecpp @@ -11,21 +11,12 @@ using namespace vdrlive; tChannelID channelid; </%args> <%cpp> - bool result = false; - reply.setContentType( "application/xml" ); - - ReadLock channelsLock( Channels ); - if ( channelsLock ) { - cChannel* channel = Channels.GetByChannelID( channelid ); - if ( channel != 0 ) - result = LiveTaskManager().SwitchChannel( channel->Number() ); - } </%cpp> <?xml version="1.0"?> <service> <request name="switch_channel"> <param name="channel"><$ *channelid.ToString() $></param> </request> -<response><$ result ? "1" : "0" $></response> +<response><$ LiveTaskManager().Execute( new SwitchChannelTask( channelid ) ) $></response> </service> |