mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-14 20:17:46 +02:00
feat(plugins): add before channel/item hooks to allow podcast/episode data edit when generating rss
This commit is contained in:
parent
8ec79097bb
commit
80d2c48ee2
15 changed files with 44 additions and 27 deletions
|
|
@ -52,7 +52,7 @@ abstract class BasePlugin implements PluginInterface
|
|||
|
||||
// TODO: cache manifest data
|
||||
$manifestPath = $directory . '/manifest.json';
|
||||
$manifestContents = file_get_contents($manifestPath);
|
||||
$manifestContents = @file_get_contents($manifestPath);
|
||||
|
||||
if (! $manifestContents) {
|
||||
$manifestContents = '{}';
|
||||
|
|
@ -93,18 +93,19 @@ abstract class BasePlugin implements PluginInterface
|
|||
$this->{$name} = $value;
|
||||
}
|
||||
|
||||
public function init(): void
|
||||
{
|
||||
// add to admin navigation
|
||||
|
||||
// TODO: setup navigation and views?
|
||||
}
|
||||
|
||||
public function channelTag(Podcast $podcast, SimpleRSSElement $channel): void
|
||||
public function rssBeforeChannel(Podcast $podcast): void
|
||||
{
|
||||
}
|
||||
|
||||
public function itemTag(Episode $episode, SimpleRSSElement $item): void
|
||||
public function rssAfterChannel(Podcast $podcast, SimpleRSSElement $channel): void
|
||||
{
|
||||
}
|
||||
|
||||
public function rssBeforeItem(Episode $episode): void
|
||||
{
|
||||
}
|
||||
|
||||
public function rssAfterItem(Episode $episode, SimpleRSSElement $item): void
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue