feat(artists): change albums table to grid on artist pages

This commit is contained in:
Cory Dransfeldt 2025-05-24 13:28:04 -07:00
parent 80b0499550
commit 9b4baad5fb
No known key found for this signature in database
14 changed files with 180 additions and 88 deletions

View file

@ -3,6 +3,7 @@
require __DIR__ . "/../../vendor/autoload.php";
require __DIR__ . "/../../server/utils/init.php";
use App\Classes\GlobalsFetcher;
use App\Classes\ArtistFetcher;
use voku\helper\HtmlMin;
@ -11,8 +12,8 @@
if (strpos($url, "music/artists/") !== 0) redirectTo404();
$fetcher = new ArtistFetcher();
$artist = $fetcher->fetch($url);
$globals = (new GlobalsFetcher())->fetch();
$artist = (new ArtistFetcher())->fetch($url);
if (!$artist) redirectTo404();

View file

@ -11,8 +11,7 @@
if (!preg_match('/^reading\/books\/([\dXx-]+)$/', $url)) redirectTo404();
$fetcher = new BookFetcher();
$book = $fetcher->fetch($url);
$book = (new BookFetcher())->fetch($url);
if (!$book) redirectTo404();

View file

@ -11,8 +11,7 @@
if (!preg_match('/^music\/genres\/[\w-]+$/', $url)) redirectTo404();
$fetcher = new GenreFetcher();
$genre = $fetcher->fetch($url);
$genre = (new GenreFetcher())->fetch($url);
if (!$genre) redirectTo404();

View file

@ -11,8 +11,7 @@
if (!preg_match('/^watching\/movies\/[\w-]+$/', $url)) redirectTo404();
$fetcher = new MovieFetcher();
$movie = $fetcher->fetch($url);
$movie = (new MovieFetcher())->fetch($url);
if (!$movie) redirectTo404();

View file

@ -11,8 +11,7 @@
if (!preg_match('/^watching\/shows\/[\w-]+$/', $url)) redirectTo404();
$fetcher = new ShowFetcher();
$show = $fetcher->fetch($url);
$show = (new ShowFetcher())->fetch($url);
if (!$show) redirectTo404();

View file

@ -27,8 +27,7 @@
$page = isset($matches[2]) ? max(1, (int)$matches[2]) : 1;
$pageSize = 20;
$fetcher = new TagFetcher();
$tagged = $fetcher->fetch($tag, $page, $pageSize);
$tagged = (new TagFetcher())->fetch($tag, $page, $pageSize);
if (!$tagged || count($tagged) === 0) {
header("Location: /404/", true, 302);