Skip to content

Commit

Permalink
Merge pull request #5 from daun/fix/delete-on-prune
Browse files Browse the repository at this point in the history
Fix error when pruning orphaned videos
  • Loading branch information
daun authored Oct 29, 2024
2 parents 01110b6 + 39730d3 commit 3e61201
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mux/MuxService.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public function deleteMuxAsset(Asset|string $asset): bool
if ($asset) {
$deleted = $this->app->make(DeleteMuxAsset::class)->handle($asset);
if ($deleted) {
MuxAsset::fromAsset($asset)->clear()->save();
if ($asset instanceof Asset) {
MuxAsset::fromAsset($asset)->clear()->save();
}

return true;
}
Expand Down

0 comments on commit 3e61201

Please sign in to comment.