text align tag + update/edit get desc + rating improve

This commit is contained in:
xiaomlove
2022-04-14 00:52:28 +08:00
parent d2a87ccda0
commit 9759c09320
44 changed files with 541 additions and 122 deletions
+7 -2
View File
@@ -262,7 +262,12 @@ class Imdb
}
public function renderTorrentsPageAverageRating($imdbId)
public function renderTorrentsPageAverageRating($imdbId): string
{
return $this->getPtGen()->buildRatingSpan([PTGen::SITE_IMDB => $this->getRating($imdbId)]);
}
public function getRating($imdbId): float|string
{
$imdbId = parse_imdb_id($imdbId);
$defaultRating = $rating = 'N/A';
@@ -273,7 +278,7 @@ class Imdb
if (!is_numeric($rating)) {
$rating = $defaultRating;
}
return $this->getPtGen()->buildRatingSpan([PTGen::SITE_IMDB => $rating]);
return $rating;
}
public function getPtGen()