Unverified Commit 4622433b authored by Kevin Gutiérrez's avatar Kevin Gutiérrez Committed by GitHub
Browse files

Add ability to disable transcodes

There could be case where someone only needs the ability to upload videos without having to transocode them.

It would also be useful while #65 is solved
parent 10a9bc0b
from distutils.version import LooseVersion from distutils.version import LooseVersion
import wagtail import wagtail
from django.conf import settings
from django.core.paginator import Paginator from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404, redirect, render from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse from django.urls import reverse
...@@ -130,7 +131,7 @@ def edit(request, video_id): ...@@ -130,7 +131,7 @@ def edit(request, video_id):
'video': video, 'video': video,
'form': form, 'form': form,
'filesize': video.get_file_size(), 'filesize': video.get_file_size(),
'can_transcode': ffmpeg.installed(), 'can_transcode': ffmpeg.installed() and not getattr(settings, 'WAGTAIL_VIDEOS_DISABLE_TRANSCODE', False),
'transcodes': video.transcodes.all(), 'transcodes': video.transcodes.all(),
'transcode_form': VideoTranscodeAdminForm(video=video), 'transcode_form': VideoTranscodeAdminForm(video=video),
'tracks_action_url': action_url, 'tracks_action_url': action_url,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment