mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
hot&classic do not resize cover
This commit is contained in:
@@ -126,7 +126,10 @@ class Test extends Command
|
||||
// $r = $rep->getContinuousDays($attendance);
|
||||
// $r = $rep->getContinuousPoints(11);
|
||||
|
||||
$r = parse_url('https://img9.doubanio.com/view/photo/l_ratio_poster/public/p2867903173.jpg', PHP_URL_SCHEME);
|
||||
$database = nexus_env('GEOIP2_DATABASE');
|
||||
$reader = new \GeoIp2\Database\Reader($database);
|
||||
$city = $reader->city("95.211.156.168");
|
||||
$r = $city->country;
|
||||
dd($r);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class User extends Authenticatable
|
||||
self::DONATE_NO => ['text' => 'No'],
|
||||
];
|
||||
|
||||
public static $cardTitles = [
|
||||
public static array $cardTitles = [
|
||||
'uploaded_human' => '上传量',
|
||||
'downloaded_human' => '下载量',
|
||||
'share_ratio' => '分享率',
|
||||
@@ -79,32 +79,6 @@ class User extends Authenticatable
|
||||
'invites' => '邀请',
|
||||
];
|
||||
|
||||
public function mappableAs(): array
|
||||
{
|
||||
return [
|
||||
'id' => 'long',
|
||||
'username' => [
|
||||
'type' => 'text',
|
||||
'analyzer' => 'ik_max_word',
|
||||
],
|
||||
'email' => [
|
||||
'type' => 'text',
|
||||
'analyzer' => 'ik_max_word',
|
||||
],
|
||||
'added' => 'date',
|
||||
];
|
||||
}
|
||||
|
||||
public function toSearchableArray()
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'username' => $this->username,
|
||||
'email' => $this->email,
|
||||
'added' => $this->added,
|
||||
];
|
||||
}
|
||||
|
||||
public function getClassTextAttribute(): string
|
||||
{
|
||||
if (!isset(self::$classes[$this->class]['text'])) {
|
||||
@@ -118,20 +92,6 @@ class User extends Authenticatable
|
||||
return $classText;
|
||||
}
|
||||
|
||||
public function getDonateStatusAttribute()
|
||||
{
|
||||
if (empty($this->donoruntil) || $this->donoruntil == '0000-00-00 00:00:00') {
|
||||
return self::DONATE_NO;
|
||||
}
|
||||
return self::DONATE_YES;
|
||||
}
|
||||
|
||||
public function getSeedPointsAttribute(): string
|
||||
{
|
||||
return $this->seed_points ?? 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 为数组 / JSON 序列化准备日期。
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.8');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-05-03');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-05-04');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', true);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -5071,7 +5071,7 @@ function displayHotAndClassic()
|
||||
{
|
||||
$pro_torrent = get_torrent_promotion_append($array['sp_state'],'word');
|
||||
if (!empty($array['cover'])) {
|
||||
$thumbnail = "<img width=\"{$width}\" height=\"{$height}\" src=\"".resize_image($array['cover'], $width, $height)."\" border=\"0\" alt=\"poster\" />";
|
||||
$thumbnail = "<img width=\"{$width}\" height=\"{$height}\" src=\"".$array['cover']."\" border=\"0\" alt=\"poster\" />";
|
||||
} elseif ($imdb_id = parse_imdb_id($array["url"])) {
|
||||
if (array_search($imdb_id, $allImdb) !== false) { //a torrent with the same IMDb url already exists
|
||||
continue;
|
||||
@@ -5082,7 +5082,7 @@ function displayHotAndClassic()
|
||||
if (empty($photo_url)) {
|
||||
do_log("torrent: {$array['id']}, url: {$array['url']}, imdb_id: $imdb_id can not get photo", 'error');
|
||||
}
|
||||
$thumbnail = "<img width=\"{$width}\" height=\"{$height}\" src=\"".resize_image($photo_url, $width, $height)."\" border=\"0\" alt=\"poster\" />";
|
||||
$thumbnail = "<img width=\"{$width}\" height=\"{$height}\" src=\"".$photo_url."\" border=\"0\" alt=\"poster\" />";
|
||||
} catch (\Exception $exception) {
|
||||
do_log($exception->getMessage() . "\n[stacktrace]\n" . $exception->getTraceAsString(), 'error');
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user