diff options
-rw-r--r-- | pages/channels_widget.ecpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pages/channels_widget.ecpp b/pages/channels_widget.ecpp new file mode 100644 index 0000000..e2b22da --- /dev/null +++ b/pages/channels_widget.ecpp @@ -0,0 +1,27 @@ +<%pre> +#include <vdr/channels.h> +#include "setup.h" +#include "tools.h" + +using namespace vdrlive; + +</%pre> +<%args> +name = "channel"; +int lastChannel = LiveSetup().GetLastChannel(); +selected; +</%args> + + <select name="<$ name $>"> +<{ + for (cChannel *listChannel = Channels.First(); listChannel && listChannel->Number() <= lastChannel; listChannel = Channels.Next(listChannel)) { + if (!listChannel->GroupSep() && *listChannel->Name()) { + std::string channelId = *listChannel->GetChannelID().ToString(); +}> + <option value="<$ listChannel->Number() $>" + <$ channelId == selected ? "selected=\"selected\"" : "" $>><$ listChannel->Name() $></option> +<{ + } + } +}> + </select> |