mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-22 02:47:27 +08:00
upload when exists redirect to details page
This commit is contained in:
@@ -179,9 +179,10 @@ unset ($dict['announce-list']); // remove multi-tracker capability
|
||||
unset ($dict['nodes']); // remove cached peers (Bitcomet & Azareus)
|
||||
|
||||
$infohash = pack("H*", sha1(\Rhilip\Bencode\Bencode::encode($dict['info']))); // double up on the becoding solves the occassional misgenerated infohash
|
||||
|
||||
if (\App\Models\Torrent::query()->where('info_hash', $infohash)->exists()) {
|
||||
bark($lang_takeupload['std_torrent_existed']);
|
||||
$exists = \App\Models\Torrent::query()->where('info_hash', $infohash)->first(['id']);
|
||||
if ($exists) {
|
||||
// bark($lang_takeupload['std_torrent_existed']);
|
||||
nexus_redirect(sprintf("details.php?id=%d&existed=1", $exists['id']));
|
||||
}
|
||||
|
||||
// ------------- start: check upload authority ------------------//
|
||||
|
||||
Reference in New Issue
Block a user