announce only check paid torrent for leechers

This commit is contained in:
xiaomlove
2023-02-12 15:04:48 +08:00
parent cd3f8576c5
commit 64defea3e3
5 changed files with 26 additions and 8 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ if ($torrent['approval_status'] != \App\Models\Torrent::APPROVAL_STATUS_ALLOW &&
err("torrent review not approved");
}
}
if (isset($torrent['price']) && $torrent['price'] > 0 && $torrent['owner'] != $userid) {
if ($seeder == 'no' && isset($torrent['price']) && $torrent['price'] > 0 && $torrent['owner'] != $userid) {
$hasBuy = \App\Models\TorrentBuyLog::query()->where('uid', $userid)->where('torrent_id', $torrent['id'])->exists();
if (!$hasBuy) {
err("You have not buy the torrent yet");