Add Download button

This commit is contained in:
df 2021-04-17 13:42:50 +00:00
parent 8b795a0a7d
commit bf838ed5e4

View File

@ -873,16 +873,22 @@ $('a.bf').click(function(e) {
type: type type: type
}); });
$('#playDL').attr('download', file.replace(/.*\//, ''));
if (type == 'ts') { if (type == 'ts') {
if (opt.attr('odencd') != 0) { if (opt.attr('odencd') != 0) {
/* encrypted: link to be enabled once populated */ /* encrypted: link to be enabled once populated */
$('#playDL').disable(); $('#playDL').disable();
/* ... but if no DLNA never Play */ /* ... but if no DLNA never Play */
if (opt.attr('dlna') != 1) $('#play').disable(); if (opt.attr('dlna') != 1) $('#play').disable();
} else {
/* link unencrypted file directly */
$('#playDL').attr('href', file);
} }
} else { } else {
/* generic: enable Play once media file is parsed */ /* generic: enable Play once media file is parsed */
$('#play').disable(); $('#play').disable();
$('#playDL').attr('href', file);
} }
$dialog.dialog('open'); $dialog.dialog('open');