mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-12 19:17:45 +02:00
chore(clips): clear video clip and soundbite cache on delete
This commit is contained in:
parent
bd61752be2
commit
241366130e
3 changed files with 33 additions and 33 deletions
|
|
@ -150,9 +150,12 @@ class SoundbiteController extends BaseController
|
|||
|
||||
if ($soundbite->media === null) {
|
||||
// delete Clip directly
|
||||
(new ClipModel())->delete($soundbite->id);
|
||||
(new ClipModel())->deleteSoundbite($this->podcast->id, $this->episode->id, $soundbite->id);
|
||||
} else {
|
||||
(new ClipModel())->clearSoundbiteCache($this->podcast->id, $this->episode->id, $soundbite->id);
|
||||
|
||||
$mediaModel = new MediaModel();
|
||||
// delete the soundbite file, the clip will be deleted on cascade
|
||||
if (! $mediaModel->deleteMedia($soundbite->media)) {
|
||||
return redirect()
|
||||
->back()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue