From: VittGam Date: Sun, 27 Apr 2014 15:02:04 +0000 (+0200) Subject: Restored ability to subscribe to a channel using the channel name. Syntax: http:... X-Git-Tag: v4.1~2111^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F382%2Fhead;p=thirdparty%2Ftvheadend.git Restored ability to subscribe to a channel using the channel name. Syntax: http://host:port/stream/channelname/ and http://host:port/playlist/channelname/ --- diff --git a/src/webui/webui.c b/src/webui/webui.c index 12f69b399..d56c79cfb 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")) {