Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Video AG Infrastruktur
website
Commits
a6fbfb3b
Unverified
Commit
a6fbfb3b
authored
1 year ago
by
Dominic Meiser
Browse files
Options
Downloads
Patches
Plain Diff
WEBM support
parent
a42d9025
Branches
Branches containing commit
No related tags found
1 merge request
!48
WEBM support
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sorter.py
+4
-3
4 additions, 3 deletions
sorter.py
with
4 additions
and
3 deletions
sorter.py
+
4
−
3
View file @
a6fbfb3b
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment