Bumping version for new feature.

Skipping video epoch test on circleci.

Created script which finds and cleans up (renames/deletes) orphaned video meta files.

Reworking orphaned video query, some video files were leaking through.

Modifying File table to allow finding of orphaned video files.

Extracting epoch from video info_json for more accurate upload_date.

Extracting epoch from video info_json for more accurate upload_date.
This commit is contained in:
Roland 2022-12-06 14:28:35 -07:00
parent b216a9c678
commit d0d69519cd
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
10 changed files with 347 additions and 30 deletions

View file

@ -32,9 +32,10 @@ def video_modeler(groups: Dict[str, List[File]], session: Session):
session.flush(group)
poster_file = next((i for i in group if i.mimetype.split('/')[0] == 'image'), None)
caption_file = next((i for i in group if i.path.name.endswith('.en.vtt') or i.path.name.endswith('.en.srt')),
None)
info_json_file = next((i for i in group if i.path.name.endswith('.info.json')), None)
# Prefer WebVTT over SRT. (SRT cannot be displayed for HTML video).
caption_file = next((i for i in group if i.path.name.endswith('.en.vtt')), None)
caption_file = caption_file or next((i for i in group if i.path.name.endswith('.en.srt')), None)
if poster_file:
poster_file.associated = True
@ -57,7 +58,7 @@ def video_modeler(groups: Dict[str, List[File]], session: Session):
caption_file != video.caption_file or \
info_json_file != video.info_json_file or \
video.size != size:
# Files were changed. Re-index.
# Files might have been changed. Re-index.
video.video_file.indexed = False
video.poster_file = poster_file