Fix zipped downloads

This commit is contained in:
Darko
2015-06-11 13:19:29 +02:00
parent aee5599a2c
commit ea75881d47
2 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ if (isset($_GET["id"]) && isset($_GET["zip"]) && $_GET["zip"] == "1") {
$page->users->incrementGrabs($uid, count($guids));
foreach ($guids as $guid) {
$rel->updateGrab($guid);
$page->users->addDownloadRequest($uid, $rel['id']);
$page->users->addDownloadRequest($uid, $guid);
if (isset($_GET["del"]) && $_GET["del"] == 1) {
$page->users->delCartByUserAndRelease($guid, $uid);
+10 -10
View File
@@ -38,7 +38,7 @@ jQuery(function ($) {
});
$('.nzb_check_all').change(function () {
$('table.browsetable tr td input:checkbox').prop('checked', $(this).prop('checked'));
$('table#browsetable tr td input:checkbox').prop('checked', $(this).prop('checked'));
});
$('.nzb_check_all_season').change(function () {
@@ -155,15 +155,15 @@ jQuery(function ($) {
/* nzb_multi_operations_form */
$('#nzb_multi_operations_form').submit(function(){return false;});
$('button.nzb_multi_operations_download').click(function(){
var newFormName = 'nzbmulti' + Math.round(+new Date()/1000);
var newForm = $("<form />", {'action': SERVERROOT + 'getnzb?zip=1', 'method':'post', 'target': '_top', 'id':newFormName});
$("table.data INPUT[type='checkbox']:checked").each( function(i, row) {
$('button.nzb_multi_operations_download').click(function () {
var ids = "";
$("table.data INPUT[type='checkbox']:checked").each( function (i, row) {
if ($(row).val()!="on")
$("<input />", {'name':'id[]', 'value':$(row).val(), 'type':'hidden'}).appendTo(newForm);
ids += $(row).val()+',';
});
newForm.appendTo($('body'));
$('#'+newFormName).submit();
ids = ids.substring(0,ids.length-1);
if (ids)
window.location = SERVERROOT + "getnzb?zip=1&id="+ids;
});
$('button.nzb_multi_operations_cart').click(function(){
var guids = new Array();
@@ -180,7 +180,7 @@ jQuery(function ($) {
icon: 'fa-icon-info-sign'
});
}
$(this).attr('checked', false);
$(this).prop('checked', false);
});
$.post( SERVERROOT + "cart?add", { 'add': guids });
});
@@ -249,7 +249,7 @@ jQuery(function ($) {
var ids = new Array();
$("table.data INPUT[type='checkbox']:checked").each( function(i, row) {
if ($(row).val()!="on")
ids.push($(row).val());
ids += '&id[]='+$(row).val();
});
if (ids)
{