Enable audio files in video edit and navigation

Updated logic in both the edit_video view and media navigation template to allow audio media types, in addition to video, to access video editing features and navigation links.
This commit is contained in:
Yiannis Christodoulou 2025-10-13 00:53:47 +03:00
parent ea67201fa5
commit cd9fc51619
2 changed files with 2 additions and 2 deletions

View File

@ -429,7 +429,7 @@ def edit_video(request):
if not (request.user == media.user or is_mediacms_editor(request.user)):
return HttpResponseRedirect("/")
if not media.media_type == "video":
if not media.media_type in ["video", "audio"]:
messages.add_message(request, messages.INFO, "Media is not video")
return HttpResponseRedirect(media.get_absolute_url())

View File

@ -11,7 +11,7 @@
{{ "Metadata" | custom_translate:LANGUAGE_CODE}}
</a>
</li>
{% if media_object.media_type == 'video' %}
{% if media_object.media_type == 'video' or media_object.media_type == 'audio' %}
<li style="display: inline-block;">
<a href="{% url 'edit_video' %}?m={{media_object.friendly_token}}"