From a86df79d1429d8026ceee3bbab03954b651fb28d Mon Sep 17 00:00:00 2001 From: VittGam Date: Sun, 27 Apr 2014 17:02:04 +0200 Subject: [PATCH] Restored ability to subscribe to a channel using the channel name. Syntax: http://host:port/stream/channelname/ and http://host:port/playlist/channelname/ --- src/webui/webui.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webui/webui.c b/src/webui/webui.c index 12f69b39..d56c79cf 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -613,6 +613,8 @@ page_http_playlist(http_connection_t *hc, const char *remain, void *opaque) ch = channel_find_by_id(atoi(components[1])); else if(nc == 2 && !strcmp(components[0], "channelnumber")) ch = channel_find_by_number(atoi(components[1])); + else if(nc == 2 && !strcmp(components[0], "channelname")) + ch = channel_find_by_name(components[1]); else if(nc == 2 && !strcmp(components[0], "channel")) ch = channel_find(components[1]); else if(nc == 2 && !strcmp(components[0], "dvrid")) @@ -885,6 +887,8 @@ http_stream(http_connection_t *hc, const char *remain, void *opaque) ch = channel_find_by_id(atoi(components[1])); } else if(!strcmp(components[0], "channelnumber")) { ch = channel_find_by_number(atoi(components[1])); + } else if(!strcmp(components[0], "channelname")) { + ch = channel_find_by_name(components[1]); } else if(!strcmp(components[0], "channel")) { ch = channel_find(components[1]); } else if(!strcmp(components[0], "service")) {