From bf838ed5e4a19f16d9e97ac7238e5e40718121a8 Mon Sep 17 00:00:00 2001 From: df Date: Sat, 17 Apr 2021 13:42:50 +0000 Subject: [PATCH] Add Download button --- webif/html/browse/script.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webif/html/browse/script.js b/webif/html/browse/script.js index daf0075..765afb7 100755 --- a/webif/html/browse/script.js +++ b/webif/html/browse/script.js @@ -873,16 +873,22 @@ $('a.bf').click(function(e) { type: type }); + $('#playDL').attr('download', file.replace(/.*\//, '')); + if (type == 'ts') { if (opt.attr('odencd') != 0) { /* encrypted: link to be enabled once populated */ $('#playDL').disable(); /* ... but if no DLNA never Play */ if (opt.attr('dlna') != 1) $('#play').disable(); + } else { + /* link unencrypted file directly */ + $('#playDL').attr('href', file); } } else { /* generic: enable Play once media file is parsed */ $('#play').disable(); + $('#playDL').attr('href', file); } $dialog.dialog('open');