diff --git a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp index 60dbac08a..b50ab79d1 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -460,6 +460,13 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: ); } + yresult += string_printf("" + "\"Stream\"" + "\n" + , channel->getChannelID() + , channel->getName().c_str() + ); + yresult += "\n\n\n"; if (channel->getServiceType() == ST_NVOD_REFERENCE_SERVICE) diff --git a/src/nhttpd/web/Y_Baselib.js b/src/nhttpd/web/Y_Baselib.js index fa4754711..7bd0552e6 100644 --- a/src/nhttpd/web/Y_Baselib.js +++ b/src/nhttpd/web/Y_Baselib.js @@ -476,3 +476,27 @@ function yhttpd_cache_clear(category) else loadSyncURL("/y/cache-clear?category="+category); } + +function saveTextAsFile(content, filename, filetype) +{ + var textFileAsBlob = new Blob([content], { type: filetype }); + var downloadLink = document.createElement("a"); + downloadLink.download = filename; + downloadLink.innerHTML = "Download File"; + if (window.webkitURL != null) + { + // Chrome allows the link to be clicked + // without actually adding it to the DOM. + downloadLink.href = window.webkitURL.createObjectURL(textFileAsBlob); + } + else + { + // Firefox requires the link to be added to the DOM + // before it can be clicked. + downloadLink.href = window.URL.createObjectURL(textFileAsBlob); + downloadLink.onclick = function() { this.parentNode.removeChild(this); }; + downloadLink.style.display = "none"; + document.body.appendChild(downloadLink); + } + downloadLink.click(); +} diff --git a/src/nhttpd/web/Y_Boxcontrol_Channellist.yhtm b/src/nhttpd/web/Y_Boxcontrol_Channellist.yhtm index 70fc17378..072ebe026 100644 --- a/src/nhttpd/web/Y_Boxcontrol_Channellist.yhtm +++ b/src/nhttpd/web/Y_Boxcontrol_Channellist.yhtm @@ -10,6 +10,15 @@ function do_zap(channelid) { function do_epg(channelid,logoid) { window.location.href="Y_Dyn_Pages.yhtm?page=frame_live_epg&channel="+channelid+"&logoid="+logoid; } +function do_stream(channelid, channelname) +{ + var title = "livestream.m3u" + var type = "application/octet-stream" + var plist = "#EXTM3U\n"; + plist += "#EXTINF:-1," + channelname + "\n"; + plist += "http://" + window.location.hostname + ":31339/id=" + channelid + "\n"; + saveTextAsFile(plist, title, type); +} function do_streaminfo() { window.open("Y_StreamInfo.yhtm", "stream", "width=400"); } diff --git a/src/nhttpd/web/Y_Version.txt b/src/nhttpd/web/Y_Version.txt index c933d7fa9..5e1a41265 100644 --- a/src/nhttpd/web/Y_Version.txt +++ b/src/nhttpd/web/Y_Version.txt @@ -1,4 +1,4 @@ -version=2.9.0.34 +version=2.9.0.35 date=14.03.2016 type=Release info=Port CST