mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
max 1000
This commit is contained in:
@@ -35,20 +35,21 @@ class ReadAndSyncEinundzwanzigPodcastFeed extends Command
|
|||||||
->json();
|
->json();
|
||||||
$einundzwanzigPodcast = Podcast::query()
|
$einundzwanzigPodcast = Podcast::query()
|
||||||
->updateOrCreate(['guid' => $podcast->feed->podcastGuid], [
|
->updateOrCreate(['guid' => $podcast->feed->podcastGuid], [
|
||||||
'title' => $podcast->feed->title,
|
'title' => $podcast->feed->title,
|
||||||
'link' => $podcast->feed->link,
|
'link' => $podcast->feed->link,
|
||||||
'language_code' => $podcast->feed->language,
|
'language_code' => $podcast->feed->language,
|
||||||
'data' => $podcast->feed,
|
'data' => $podcast->feed,
|
||||||
'created_by' => 1,
|
'created_by' => 1,
|
||||||
]);
|
]);
|
||||||
$episodes = $client->episodes->byFeedUrl('https://einundzwanzig.space/feed.xml')
|
$episodes = $client->episodes->withParameters(['max' => 1000])
|
||||||
|
->byFeedId(185230)
|
||||||
->json();
|
->json();
|
||||||
foreach ($episodes->items as $item) {
|
foreach ($episodes->items as $item) {
|
||||||
Episode::query()
|
Episode::query()
|
||||||
->updateOrCreate(['guid' => $item->guid], [
|
->updateOrCreate(['guid' => $item->guid], [
|
||||||
'podcast_id' => $einundzwanzigPodcast->id,
|
'podcast_id' => $einundzwanzigPodcast->id,
|
||||||
'data' => $item,
|
'data' => $item,
|
||||||
'created_by' => 1,
|
'created_by' => 1,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user