Commit 36ac2a12 authored by Julian Rother's avatar Julian Rother
Browse files

Small cleanup

parent dcb0516d
......@@ -226,7 +226,9 @@ def sort_now():
for mountpoint in config['VIDEOMOUNT']:
existingvideos = query('SELECT videos.path FROM videos JOIN lectures ON (videos.lecture_id = WHERE lectures.course_id = ?',course['id'])
knownerrors = query('SELECT sorterrorlog.path FROM sorterrorlog WHERE sorterrorlog.course_id = ?',course['id'])
ignorefiles = existingvideos + knownerrors
ignorefiles = []
for path in existingvideos + knownerrors:
lectures = query('SELECT * from lectures where course_id = ?',course['id'])
coursepath = mountpoint['mountpoint']+course['handle']
......@@ -236,14 +238,7 @@ def sort_now():
for filename in files:
# if the video is in the table "videos" already (with the correct course), skip it
ignore = False
for file_to_ignore in ignorefiles:
# path is something like
# vpnonline/08ws-swt/08ws-swt-081118.mp4
if os.path.basename(filename) == os.path.basename(file_to_ignore['path']):
ignore = True
if ignore:
if os.path.basename(filename) in ignorefiles:
if not os.path.splitext(filename)[1] == '.mp4':
Supports Markdown
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