mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 13:32:41 +08:00
hr inspect time use create_time
This commit is contained in:
@@ -62,17 +62,18 @@ class HitAndRun extends NexusModel
|
||||
if ($this->status != self::STATUS_INSPECTING) {
|
||||
return '---';
|
||||
}
|
||||
if (!$this->snatch->completedat) {
|
||||
//not download completed
|
||||
return '---';
|
||||
}
|
||||
//change to use create time
|
||||
// if (!$this->snatch->completedat) {
|
||||
// //not download completed
|
||||
// return '---';
|
||||
// }
|
||||
$searchBoxId = $this->torrent->basic_category->mode ?? 0;
|
||||
if ($searchBoxId == 0) {
|
||||
do_log(sprintf('[INVALID_CATEGORY], Torrent: %s', $this->torrent_id), 'error');
|
||||
return '---';
|
||||
}
|
||||
$inspectTime = HitAndRun::getConfig('inspect_time', $searchBoxId);
|
||||
$diffInSeconds = Carbon::now()->diffInSeconds($this->snatch->completedat->addHours($inspectTime));
|
||||
$diffInSeconds = Carbon::now()->diffInSeconds($this->created_at->addHours($inspectTime));
|
||||
return mkprettytime($diffInSeconds);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user