diff --git a/src/library/database.php b/src/library/database.php
index 0d605df..ae572a1 100644
--- a/src/library/database.php
+++ b/src/library/database.php
@@ -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++;
diff --git a/src/public/index.php b/src/public/index.php
index 45c7041..80eedd0 100644
--- a/src/public/index.php
+++ b/src/public/index.php
@@ -151,7 +151,8 @@ else
],
'seeders' => $db->getMagnetToAddressTrackerSeedersSumByMagnetId($magnet->magnetId),
'completed' => $db->getMagnetToAddressTrackerCompletedSumByMagnetId($magnet->magnetId),
- 'leechers' => $db->getMagnetToAddressTrackerLeechersSumByMagnetId($magnet->magnetId)
+ 'leechers' => $db->getMagnetToAddressTrackerLeechersSumByMagnetId($magnet->magnetId),
+ 'directs' => $db->getMagnetToAcceptableSourceTotalByMagnetId($magnet->magnetId)
];
}
}
@@ -307,6 +308,14 @@ echo '' . PHP_EOL ?>
leechers ?>
+ directs) { ?>
+
+
+ directs ?>
+
+
star->status) { ?>
diff --git a/src/public/magnet.php b/src/public/magnet.php
index d9b5bfe..5005743 100644
--- a/src/public/magnet.php
+++ b/src/public/magnet.php
@@ -133,7 +133,8 @@ else
],
'seeders' => $db->getMagnetToAddressTrackerSeedersSumByMagnetId($magnet->magnetId),
'completed' => $db->getMagnetToAddressTrackerCompletedSumByMagnetId($magnet->magnetId),
- 'leechers' => $db->getMagnetToAddressTrackerLeechersSumByMagnetId($magnet->magnetId)
+ 'leechers' => $db->getMagnetToAddressTrackerLeechersSumByMagnetId($magnet->magnetId),
+ 'directs' => $db->getMagnetToAcceptableSourceTotalByMagnetId($magnet->magnetId),
];
}
@@ -288,6 +289,14 @@ echo '' . PHP_EOL ?>
magnet->leechers ?>
+ magnet->directs) { ?>
+
+
+ magnet->directs ?>
+
+
magnet->star->status) { ?>