MT#15425 audio_cache reload on soundfile delete

Change-Id: I1634c0de4a4e13c52b54e04b9177962591d862d0
changes/84/2784/2
Gerhard Jungwirth 11 years ago
parent 91a6aeb6f6
commit fdfac50423

@ -135,6 +135,14 @@ sub DELETE :Allow {
$guard->commit;
# clear audio caches
my $group_name = $item->handle->group->name;
try {
NGCP::Panel::Utils::Sems::clear_audio_cache($c, $item->set_id, $item->handle->name, $group_name);
} catch ($e) {
$c->log->warn("Failed to clear audio cache for group " . $group_name);
}
$c->response->status(HTTP_NO_CONTENT);
$c->response->body(q());
}

@ -670,6 +670,16 @@ sub handles_delete :Chained('handles_base') :PathPart('delete') {
desc => $c->loc('Failed to delete sound handle'),
);
};
# clear audio caches
my $handle = $c->stash->{file_result}->handle;
my $group_name = $handle->group->name;
try {
NGCP::Panel::Utils::Sems::clear_audio_cache($c, $c->stash->{file_result}->set_id, $handle->name, $group_name);
} catch ($e) {
$c->log->warn("Failed to clear audio cache for group " . $group_name);
}
NGCP::Panel::Utils::Navigation::back_or($c, $c->stash->{handles_base_uri});
return;
}

Loading…
Cancel
Save