mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
yWeb: add link to get stream to channellist; thx to dasda
Origin commit data
------------------
Branch: ni/coolstream
Commit: 5f613b0b30
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-03-14 (Mon, 14 Mar 2016)
Origin message was:
------------------
- yWeb: add link to get stream to channellist; thx to dasda
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -460,6 +460,13 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
|
||||
);
|
||||
}
|
||||
|
||||
yresult += string_printf("<a href=\"javascript:do_stream('"PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS"','%s')\">"
|
||||
"<img src=\"/images/stream.png\" alt=\"Stream\" title=\"Stream\" />"
|
||||
"</a>\n"
|
||||
, channel->getChannelID()
|
||||
, channel->getName().c_str()
|
||||
);
|
||||
|
||||
yresult += "</td></tr></table>\n</td>\n</tr>\n";
|
||||
|
||||
if (channel->getServiceType() == ST_NVOD_REFERENCE_SERVICE)
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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");
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
version=2.9.0.34
|
||||
version=2.9.0.35
|
||||
date=14.03.2016
|
||||
type=Release
|
||||
info=Port CST
|
||||
|
Reference in New Issue
Block a user