add direct downloads indicator

This commit is contained in:
ghost 2023-09-06 14:00:11 +03:00
parent c9887fc601
commit 387ca35a9c
3 changed files with 31 additions and 2 deletions

View file

@ -885,6 +885,17 @@ class Database {
return (int) $query->fetch()->result;
}
public function getMagnetToAcceptableSourceTotalByMagnetId(int $magnetId) : int {
$this->_debug->query->select->total++;
$query = $this->_db->prepare('SELECT COUNT(*) AS `result` FROM `magnetToAcceptableSource` WHERE `magnetId` = ?');
$query->execute([$magnetId]);
return (int) $query->fetch()->result;
}
public function getMagnetToAddressTrackerSeedersSum() : int {
$this->_debug->query->select->total++;