fix(DownloadSeasonHandler): actually captures season/episode numbers

This commit is contained in:
Brock H Caldwell
2026-02-08 21:51:02 -06:00
parent cc88660c07
commit 759f64ea22

View File

@@ -71,6 +71,7 @@ readonly class DownloadSeasonHandler implements HandlerInterface
$this->logger->info('> [DownloadTvSeasonHandler] ......Found 1 matching result');
$this->logger->info('> [DownloadTvSeasonHandler] ......Dispatching DownloadMediaCommand for "' . $series->title . '" season ' . $command->season . ' episode ' . $episode->episodeNumber);
$download = $this->createDownload($command, $result->url, $series->title, $result->filename, $episode->episodeNumber);
$this->logger->info('> [DownloadTvSeasonHandler] ......Created Download entity with id ' . $download->getId());
$downloadCommand = new DownloadMediaCommand(
$download->getUrl(),
$download->getTitle(),
@@ -105,6 +106,7 @@ readonly class DownloadSeasonHandler implements HandlerInterface
$download->setEpisodeId($this->getEpisodeNumber($command->season, $episodeNumber));
$download->setUser($this->userRepository->find($command->userId));
$this->downloadRepository->getEntityManager()->persist($download);
$this->downloadRepository->getEntityManager()->flush();
return $download;
}