mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-26 01:46:18 -05:00
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:
parent
b216a9c678
commit
d0d69519cd
10 changed files with 347 additions and 30 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue