feat: tv episode results
This commit is contained in:
32
src/Torrentio/Action/Input/GetTvShowOptionsInput.php
Normal file
32
src/Torrentio/Action/Input/GetTvShowOptionsInput.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Torrentio\Action\Input;
|
||||
|
||||
use App\Torrentio\Action\Command\GetTvShowOptionsCommand;
|
||||
use OneToMany\RichBundle\Attribute\SourceRoute;
|
||||
use OneToMany\RichBundle\Contract\CommandInterface;
|
||||
use OneToMany\RichBundle\Contract\InputInterface;
|
||||
|
||||
class GetTvShowOptionsInput implements InputInterface
|
||||
{
|
||||
public function __construct(
|
||||
#[SourceRoute('tmdbId')]
|
||||
public string $tmdbId,
|
||||
#[SourceRoute('imdbId')]
|
||||
public string $imdbId,
|
||||
#[SourceRoute('season', nullify: true)]
|
||||
public ?string $season,
|
||||
#[SourceRoute('episode', nullify: true)]
|
||||
public string $episode,
|
||||
) {}
|
||||
|
||||
public function toCommand(): CommandInterface
|
||||
{
|
||||
return new GetTvShowOptionsCommand(
|
||||
$this->tmdbId,
|
||||
$this->imdbId,
|
||||
$this->season,
|
||||
$this->episode
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user