mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
improe announce
This commit is contained in:
@@ -97,7 +97,9 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$r = NexusDB::cache_get("user_all_permissions:10001");
|
||||
$authkey = "12|52|abc";
|
||||
$subAuthkey = substr($authkey, 0, strrpos($authkey, "|"));
|
||||
$r = $subAuthkey;
|
||||
dd($r);
|
||||
}
|
||||
|
||||
|
||||
@@ -381,12 +381,14 @@ class TorrentRepository extends BaseRepository
|
||||
|
||||
private function getTrackerReportAuthKeySecret($id, $uid, $initializeIfNotExists = false)
|
||||
{
|
||||
$secret = TorrentSecret::query()
|
||||
->where('uid', $uid)
|
||||
->whereIn('torrent_id', [0, $id])
|
||||
->orderBy('torrent_id', 'desc')
|
||||
->orderBy('id', 'desc')
|
||||
->first();
|
||||
$secret = NexusDB::remember("torrent_secret_{$uid}_{$id}", 3600, function () use ($id, $uid) {
|
||||
return TorrentSecret::query()
|
||||
->where('uid', $uid)
|
||||
->whereIn('torrent_id', [0, $id])
|
||||
->orderBy('torrent_id', 'desc')
|
||||
->orderBy('id', 'desc')
|
||||
->first();
|
||||
});
|
||||
|
||||
if ($secret) {
|
||||
return $secret->secret;
|
||||
|
||||
Reference in New Issue
Block a user