mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-12 19:17:45 +02:00
feat: add WebSub module for pushing feed updates to open hubs
This commit is contained in:
parent
1253096197
commit
10d3f73786
17 changed files with 244 additions and 3 deletions
|
|
@ -280,6 +280,9 @@ class EpisodeController extends BaseController
|
|||
$this->episode->setAudio($this->request->getFile('audio_file'));
|
||||
$this->episode->setCover($this->request->getFile('cover'));
|
||||
|
||||
// republish on websub hubs upon edit
|
||||
$this->episode->is_published_on_hubs = false;
|
||||
|
||||
$transcriptChoice = $this->request->getPost('transcript-choice');
|
||||
if ($transcriptChoice === 'upload-file') {
|
||||
$transcriptFile = $this->request->getFile('transcript_file');
|
||||
|
|
@ -725,6 +728,11 @@ class EpisodeController extends BaseController
|
|||
(new PostModel())->removePost($post);
|
||||
}
|
||||
|
||||
// set podcast is_published_on_hubs to false to trigger websub push
|
||||
(new PodcastModel())->update($this->episode->podcast->id, [
|
||||
'is_published_on_hubs' => false,
|
||||
]);
|
||||
|
||||
$episodeModel = new EpisodeModel();
|
||||
if ($this->episode->published_at !== null) {
|
||||
// if episode is published, set episode published_at to null to unpublish before deletion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue