mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
ffprobe json may not be valid, the video should still be retrieved.
This commit is contained in:
parent
f44ac91319
commit
3e39102a55
1 changed files with 7 additions and 3 deletions
|
|
@ -58,9 +58,13 @@ class Video(ModelHelper, Base):
|
|||
|
||||
codec_names = []
|
||||
codec_types = []
|
||||
if self.ffprobe_json:
|
||||
codec_names = [i['codec_name'] for i in self.ffprobe_json['streams']]
|
||||
codec_types = [i['codec_type'] for i in self.ffprobe_json['streams']]
|
||||
|
||||
try:
|
||||
if self.ffprobe_json:
|
||||
codec_names = [i['codec_name'] for i in self.ffprobe_json['streams']]
|
||||
codec_types = [i['codec_type'] for i in self.ffprobe_json['streams']]
|
||||
except Exception as e:
|
||||
logger.error(f'{self} ffprobe_json is invalid', exc_info=e)
|
||||
|
||||
# Put live data in "video" instead of "data" to avoid confusion on the frontend.
|
||||
d['video'] = dict(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue