feat: media result page

This commit is contained in:
2025-04-21 11:30:18 -05:00
parent fb4b7dc71e
commit 77907601f8
24 changed files with 844 additions and 19 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Search\Action\Handler;
use App\Search\Action\Result\GetMediaInfoResult;
use App\Tmdb\Tmdb;
use OneToMany\RichBundle\Contract\CommandInterface;
use OneToMany\RichBundle\Contract\HandlerInterface;
use OneToMany\RichBundle\Contract\ResultInterface;
class GetMediaInfoHandler implements HandlerInterface
{
public function __construct(
private readonly Tmdb $tmdb,
) {}
public function handle(CommandInterface $command): ResultInterface
{
$media = $this->tmdb->mediaDetails($command->tmdbId, $command->mediaType);
return new GetMediaInfoResult($media);
}
}