mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-04 15:26:43 +02:00
feat(media): save audio, images, transcripts and chapters to media for episode and persons
This commit is contained in:
parent
fafaa7e689
commit
58e2a00a87
22 changed files with 144 additions and 129 deletions
|
|
@ -192,6 +192,9 @@ class PodcastController extends BaseController
|
|||
$partnerImageUrl = null;
|
||||
}
|
||||
|
||||
$db = db_connect();
|
||||
$db->transStart();
|
||||
|
||||
$newPodcast = new Podcast([
|
||||
'title' => $this->request->getPost('title'),
|
||||
'handle' => $this->request->getPost('handle'),
|
||||
|
|
@ -226,9 +229,6 @@ class PodcastController extends BaseController
|
|||
'updated_by' => user_id(),
|
||||
]);
|
||||
|
||||
$db = db_connect();
|
||||
$db->transStart();
|
||||
|
||||
$podcastModel = new PodcastModel();
|
||||
if (! ($newPodcastId = $podcastModel->insert($newPodcast, true))) {
|
||||
$db->transRollback();
|
||||
|
|
@ -363,10 +363,8 @@ class PodcastController extends BaseController
|
|||
return redirect()->back();
|
||||
}
|
||||
|
||||
$this->podcast->banner->deleteFile();
|
||||
|
||||
$mediaModel = new MediaModel();
|
||||
if (! $mediaModel->deleteMedia((int) $this->podcast->banner_id)) {
|
||||
if (! $mediaModel->deleteMedia($this->podcast->banner)) {
|
||||
return redirect()
|
||||
->back()
|
||||
->withInput()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue