Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 38a5baa17e | |||
| 1d573c09e7 |
@@ -6,6 +6,7 @@ services:
|
||||
environment:
|
||||
MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||
tty: true
|
||||
deploy:
|
||||
replicas: 2
|
||||
volumes:
|
||||
|
||||
@@ -55,10 +55,6 @@ readonly class MonitorTvSeasonHandler implements HandlerInterface
|
||||
$this->logger->info('> [MonitorTvSeasonHandler] Found ' . count($episodesInSeason) . ' episodes in season ' . $monitor->getSeason() . ' for title: ' . $monitor->getTitle());
|
||||
|
||||
if ($downloadedEpisodes->count() !== $episodesInSeason->count()) {
|
||||
// Since $monitor has children monitors, set the status
|
||||
// to Active, so it will be re-executed.
|
||||
$monitor->setStatus('Active');
|
||||
|
||||
// Dispatch Episode commands for each missing Episode
|
||||
foreach ($episodesInSeason as $episode) {
|
||||
// Check if the episode is already downloaded
|
||||
@@ -99,6 +95,8 @@ readonly class MonitorTvSeasonHandler implements HandlerInterface
|
||||
}
|
||||
}
|
||||
|
||||
// Set the status to Active, so it will be re-executed.
|
||||
$monitor->setStatus('Active');
|
||||
$monitor->setLastSearch(new DateTimeImmutable());
|
||||
$monitor->setSearchCount($monitor->getSearchCount() + 1);
|
||||
|
||||
|
||||
@@ -56,10 +56,6 @@ readonly class MonitorTvShowHandler implements HandlerInterface
|
||||
$this->logger->info('> [MonitorTvShowHandler] Found ' . count($episodesInShow) . ' episodes for title: ' . $monitor->getTitle());
|
||||
|
||||
if ($downloadedEpisodes->count() !== $episodesInShow->count()) {
|
||||
// Since $monitor has children monitors, set the status
|
||||
// to Active, so it will be re-executed.
|
||||
$monitor->setStatus('Active');
|
||||
|
||||
// Dispatch Episode commands for each missing Episode
|
||||
foreach ($episodesInShow as $episode) {
|
||||
// Check if the episode is already downloaded
|
||||
@@ -102,6 +98,8 @@ readonly class MonitorTvShowHandler implements HandlerInterface
|
||||
}
|
||||
}
|
||||
|
||||
// Set the status to Active, so it will be re-executed.
|
||||
$monitor->setStatus('Active');
|
||||
$monitor->setLastSearch(new DateTimeImmutable());
|
||||
$monitor->setSearchCount($monitor->getSearchCount() + 1);
|
||||
$this->entityManager->flush();
|
||||
|
||||
@@ -152,7 +152,7 @@ class MediaFiles
|
||||
foreach ($existingEpisodes as $episode) {
|
||||
$ptn = (object) (new PTN())->parse($episode->getFilename());
|
||||
|
||||
if (!property_exists($episode, 'season') || !property_exists($episode, 'episode')) {
|
||||
if (!property_exists($ptn, 'season') || !property_exists($ptn, 'episode')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user