Loading app/Database/Migrations/2024-02-05-160000_add_podcasts_medium.php 0 → 100644 +36 −0 Original line number Diff line number Diff line <?php declare(strict_types=1); /** * Class AddPodcastsMediumField adds medium field to podcast table in database * * @copyright 2020 Ad Aures * @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3 * @link https://castopod.org/ */ namespace App\Database\Migrations; class AddPodcastsMediumField extends BaseMigration { public function up(): void { $fields = [ 'medium' => [ 'type' => "ENUM('podcast','music','audiobook')", 'null' => false, 'default' => 'podcast', 'after' => 'type', ], ]; $this->forge->addColumn('podcasts', $fields); } public function down(): void { $fields = ['medium']; $this->forge->dropColumn('podcasts', $fields); } } app/Entities/Podcast.php +2 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ use RuntimeException; * @property string $owner_email * @property bool $is_owner_email_removed_from_feed * @property string $type * @property string $medium * @property string|null $copyright * @property string|null $episode_description_footer_markdown * @property string|null $episode_description_footer_html Loading Loading @@ -196,6 +197,7 @@ class Podcast extends Entity 'owner_email' => 'string', 'is_owner_email_removed_from_feed' => 'boolean', 'type' => 'string', 'medium' => 'string', 'copyright' => '?string', 'episode_description_footer_markdown' => '?string', 'episode_description_footer_html' => '?string', Loading app/Helpers/rss_helper.php +2 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,8 @@ if (! function_exists('get_rss_feed')) { $channel->addChild('title', $podcast->title, null, false); $channel->addChildWithCDATA('description', $podcast->description_html); $channel->addChild('medium', $podcast->medium, $podcastNamespace); $itunesImage = $channel->addChild('image', null, $itunesNamespace); $itunesImage->addAttribute('href', $podcast->cover->feed_url); Loading app/Models/PodcastModel.php +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ class PodcastModel extends Model 'is_owner_email_removed_from_feed', 'publisher', 'type', 'medium', 'copyright', 'imported_feed_url', 'new_feed_url', Loading modules/Admin/Controllers/PodcastController.php +2 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,7 @@ class PodcastController extends BaseController 'is_owner_email_removed_from_feed' => $this->request->getPost('is_owner_email_removed_from_feed') === 'yes', 'publisher' => $this->request->getPost('publisher'), 'type' => $this->request->getPost('type'), 'medium' => $this->request->getPost('medium'), 'copyright' => $this->request->getPost('copyright'), 'location' => $this->request->getPost('location_name') === '' ? null : new Location( $this->request->getPost('location_name') Loading Loading @@ -314,6 +315,7 @@ class PodcastController extends BaseController $this->podcast->owner_name = $this->request->getPost('owner_name'); $this->podcast->owner_email = $this->request->getPost('owner_email'); $this->podcast->type = $this->request->getPost('type'); $this->podcast->medium = $this->request->getPost('medium'); $this->podcast->copyright = $this->request->getPost('copyright'); $this->podcast->location = $this->request->getPost('location_name') === '' ? null : new Location( $this->request->getPost('location_name') Loading Loading
app/Database/Migrations/2024-02-05-160000_add_podcasts_medium.php 0 → 100644 +36 −0 Original line number Diff line number Diff line <?php declare(strict_types=1); /** * Class AddPodcastsMediumField adds medium field to podcast table in database * * @copyright 2020 Ad Aures * @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3 * @link https://castopod.org/ */ namespace App\Database\Migrations; class AddPodcastsMediumField extends BaseMigration { public function up(): void { $fields = [ 'medium' => [ 'type' => "ENUM('podcast','music','audiobook')", 'null' => false, 'default' => 'podcast', 'after' => 'type', ], ]; $this->forge->addColumn('podcasts', $fields); } public function down(): void { $fields = ['medium']; $this->forge->dropColumn('podcasts', $fields); } }
app/Entities/Podcast.php +2 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ use RuntimeException; * @property string $owner_email * @property bool $is_owner_email_removed_from_feed * @property string $type * @property string $medium * @property string|null $copyright * @property string|null $episode_description_footer_markdown * @property string|null $episode_description_footer_html Loading Loading @@ -196,6 +197,7 @@ class Podcast extends Entity 'owner_email' => 'string', 'is_owner_email_removed_from_feed' => 'boolean', 'type' => 'string', 'medium' => 'string', 'copyright' => '?string', 'episode_description_footer_markdown' => '?string', 'episode_description_footer_html' => '?string', Loading
app/Helpers/rss_helper.php +2 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,8 @@ if (! function_exists('get_rss_feed')) { $channel->addChild('title', $podcast->title, null, false); $channel->addChildWithCDATA('description', $podcast->description_html); $channel->addChild('medium', $podcast->medium, $podcastNamespace); $itunesImage = $channel->addChild('image', null, $itunesNamespace); $itunesImage->addAttribute('href', $podcast->cover->feed_url); Loading
app/Models/PodcastModel.php +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ class PodcastModel extends Model 'is_owner_email_removed_from_feed', 'publisher', 'type', 'medium', 'copyright', 'imported_feed_url', 'new_feed_url', Loading
modules/Admin/Controllers/PodcastController.php +2 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,7 @@ class PodcastController extends BaseController 'is_owner_email_removed_from_feed' => $this->request->getPost('is_owner_email_removed_from_feed') === 'yes', 'publisher' => $this->request->getPost('publisher'), 'type' => $this->request->getPost('type'), 'medium' => $this->request->getPost('medium'), 'copyright' => $this->request->getPost('copyright'), 'location' => $this->request->getPost('location_name') === '' ? null : new Location( $this->request->getPost('location_name') Loading Loading @@ -314,6 +315,7 @@ class PodcastController extends BaseController $this->podcast->owner_name = $this->request->getPost('owner_name'); $this->podcast->owner_email = $this->request->getPost('owner_email'); $this->podcast->type = $this->request->getPost('type'); $this->podcast->medium = $this->request->getPost('medium'); $this->podcast->copyright = $this->request->getPost('copyright'); $this->podcast->location = $this->request->getPost('location_name') === '' ? null : new Location( $this->request->getPost('location_name') Loading