Browse Source

count downloads toal/unique

main
ghost 1 year ago
parent
commit
4cc5443669
  1. BIN
      database/yggtracker.mwb
  2. 8
      src/public/action.php

BIN
database/yggtracker.mwb

Binary file not shown.

8
src/public/action.php

@ -130,12 +130,8 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false) @@ -130,12 +130,8 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
// Request valid
else
{
// Download exists, trigger delete
if (!$db->findMagnetDownloadsTotalByUserId($magnet->magnetId, $userId))
{
// Download not exists, add new record
// Update download stats
$db->addMagnetDownload($magnet->magnetId, $userId, time());
}
// Build magnet link
$link = [];
@ -210,7 +206,7 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false) @@ -210,7 +206,7 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
$uri->value)));
}
// Redirect to edit page
// Return download link
header(
sprintf('Location: %s', implode('&', $link))
);

Loading…
Cancel
Save