diff --git a/app/Console/Commands/Feed/ReadAndSyncPodcastFeeds.php b/app/Console/Commands/Feed/ReadAndSyncPodcastFeeds.php index 9c0117aa..3830ed24 100644 --- a/app/Console/Commands/Feed/ReadAndSyncPodcastFeeds.php +++ b/app/Console/Commands/Feed/ReadAndSyncPodcastFeeds.php @@ -42,7 +42,7 @@ class ReadAndSyncPodcastFeeds extends Command foreach ($feedIds as $feedId) { $podcast = $client->podcasts->byFeedId($feedId) ->json(); - $einundzwanzigPodcast = Podcast::query() + $importPodcast = Podcast::query() ->updateOrCreate(['guid' => $podcast->feed->podcastGuid], [ 'title' => $podcast->feed->title, 'link' => $podcast->feed->link, @@ -56,7 +56,7 @@ class ReadAndSyncPodcastFeeds extends Command foreach ($episodes->items as $item) { Episode::query() ->updateOrCreate(['guid' => $item->guid], [ - 'podcast_id' => $einundzwanzigPodcast->id, + 'podcast_id' => $importPodcast->id, 'data' => $item, 'created_by' => 1, 'created_at' => Carbon::parse($item->datePublished), diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 64d1cd5b..ce18082a 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -10,6 +10,11 @@ use Laravel\Nova\Trix\PruneStaleAttachments; class Kernel extends ConsoleKernel { + protected $commands = [ + SyncOpenBooks::class, + ReadAndSyncPodcastFeeds::class + ]; + /** * Define the application's command schedule. * @@ -21,9 +26,9 @@ class Kernel extends ConsoleKernel { $schedule->call(new PruneStaleAttachments) ->daily(); - $schedule->call('books:sync') + $schedule->call(SyncOpenBooks::class) ->dailyAt('23:00'); - $schedule->call('feed:sync') + $schedule->call(ReadAndSyncPodcastFeeds::class) ->dailyAt('23:30'); }