Local upload backend: Always use .ts extension

Now that we're doing that for both fast and full cuts.
pull/142/head
Mike Lang 5 years ago
parent 1cb4d41334
commit 4c0e20983c

@ -227,8 +227,7 @@ class Local(UploadBackend):
video_id = str(uuid.uuid4()) video_id = str(uuid.uuid4())
# make title safe by removing offending characters, replacing with '-' # make title safe by removing offending characters, replacing with '-'
safe_title = re.sub('[^A-Za-z0-9_]', '-', title) safe_title = re.sub('[^A-Za-z0-9_]', '-', title)
# If fast cut enabled, use .ts, otherwise use .mp4 ext = 'ts'
ext = 'ts' if self.encoding_settings is None else 'mp4'
filename = '{}-{}.{}'.format(safe_title, video_id, ext) filename = '{}-{}.{}'.format(safe_title, video_id, ext)
filepath = os.path.join(self.path, filename) filepath = os.path.join(self.path, filename)
try: try:

Loading…
Cancel
Save