<%pre> #include #include "exception.h" #include "tasks.h" #include "tools.h" using namespace vdrlive; <%args> tChannelID channelid; <%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() ); } <$ *channelid.ToString() $> <$ result ? "1" : "0" $>