innocampus / videbo

Distributed video hosting for Moodle and other LMS
https://innocampus.github.io/videbo/
0 stars 0 forks source link

Properly log validation errors when parsing `VideoInfo` #12

Open daniil-berg opened 2 months ago

daniil-berg commented 2 months ago

Currently the get_ffprobe_info function simply replaces a ValidationError with an FFProbeError that contains the stderr string from the sub-process.

https://github.com/innocampus/videbo/blob/e7b53e0d6668e2b47b8a9a5342e8123a98845f12/src/videbo/video/analyze.py#L132-L142

There should probably be two distinct error paths: One handling a non-empty stderr and the other handling a validation error when parsing stdout.