Project

General

Profile

Feature #708 ยป download.patch

illyah, 04/09/2013 03:38 PM

View differences:

vdr-plugin-live/pages/recstream.ecpp 2013-04-09 14:38:06.000000000 +0200
</%pre>
<%args>
string recid;
int download;
</%args>
<%session scope="global">
bool logged_in(false);
......
cRecording const * recording = LiveRecordingsManager()->GetByMd5Hash(recid);
if (recording) {
reply.setContentType("video/mpeg");
if(download)
{
reply.setContentType("application/octet-stream");
}
else
{
reply.setContentType("video/mpeg");
}
reply.setKeepAliveHeader();
reply.setContentLengthHeader(RecSize(recording));
reply.setDirectMode();
++ vdr-plugin-live/pages/pageelems.ecpp 2013-04-09 15:01:19.000000000 +0200
......
<# ---------------------------------------------------------------------- #>
<%def download_recording>
<%args>
string recid;
string linkText;
string title;
</%args>
<%cpp>
</%cpp><a href="recstream.html/<$ title $>.ts?recid=<$ recid $>&download=1"><img src="<$ LiveSetup().GetThemedLink("img", "movie.png") $>" alt="" <& tooltip.hint text=(tr("Download this recordingr.")) &>></img><$ linkText $></a>
</%def>
<# ---------------------------------------------------------------------- #>
<%def event_timer>
<%args>
string epgid;
++ vdr-plugin-live/pages/recordings.ecpp 2013-04-09 14:56:41.000000000 +0200
......
</%args>
<& pageelems.ajax_action_href action="play_recording" param=(id) tip=(tr("play this recording.")) image="play.png" alt="" &>
<& pageelems.vlc_stream_recording recid=(id) &>
<& pageelems.download_recording recid=(id) title=(title) &>
<& pageelems.imdb_info_href title=(title) &>
<& recordings.edit_rec id=(id) &>
<& recordings.del_rec id=(id) &>
    (1-1/1)