fix-feat: ajax download call
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Torrentio\Action\Handler;
|
||||
|
||||
use App\Tmdb\Tmdb;
|
||||
use App\Torrentio\Action\Result\GetMovieOptionsResult;
|
||||
use App\Torrentio\Client\Torrentio;
|
||||
use OneToMany\RichBundle\Contract\CommandInterface;
|
||||
@@ -11,13 +12,15 @@ use OneToMany\RichBundle\Contract\ResultInterface;
|
||||
class GetMovieOptionsHandler implements HandlerInterface
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Tmdb $tmdb,
|
||||
private readonly Torrentio $torrentio,
|
||||
) {}
|
||||
|
||||
public function handle(CommandInterface $command): ResultInterface
|
||||
{
|
||||
return new GetMovieOptionsResult(
|
||||
results: $this->torrentio->search($command->imdbId, 'movies')
|
||||
media: $this->tmdb->mediaDetails($command->tmdbId, 'movies'),
|
||||
results: $this->torrentio->search($command->imdbId, 'movies'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user