Restored ability to subscribe to a channel using the channel name. Syntax: http://host:port/stream/channelname/<chname> and http://host:port/playlist/channelname/<chname>

This commit is contained in:
VittGam 2014-04-27 17:02:04 +02:00
parent e113c3bc22
commit a86df79d14

View file

@ -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")) {