Skip to content
Snippets Groups Projects
Unverified Commit a6fbfb3b authored by Dominic Meiser's avatar Dominic Meiser
Browse files

WEBM support

parent a42d9025
Branches
No related tags found
1 merge request!48WEBM support
......@@ -77,10 +77,10 @@ def split_filename(filename):
return filename.replace('_', '-').replace(' ', '-').split('-')
def parse_filename(filename):
# filenames: <handle>-<sorter>-<format>.mp4, split at '-' into an array
# filenames: <handle>-<sorter>-<format>.<ext>, split at '-' into an array
data = {'keywords': []}
for chunk in filename:
chunk = chunk.replace('.mp4', '')
chunk = chunk.replace('.mp4', '').replace('.webm', '')
#-<YYMMDD> (date)
#-<HHMM> (time)
#-<keyword>
......@@ -226,7 +226,8 @@ def sort_now():
# if the video is in the table "videos" already (with the correct course), skip it
if os.path.basename(filename) in ignorefiles:
continue
if not os.path.splitext(filename)[1] == '.mp4':
ext = os.path.splitext(filename)[1]
if not ext == '.mp4' and not ext == '.webm':
continue
matches, fmt = sort_file(filename, course=course, lectures=lectures)
dbfilepath = mountpoint['prefix']+course['handle']+'/'+filename
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment