Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BACKEND] Show ffmpeg conversion errors #1016

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/ytdl_sub/plugins/file_convert.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from subprocess import CalledProcessError
from typing import Any
from typing import Dict
from typing import Optional
Expand Down Expand Up @@ -204,9 +205,10 @@ def modify_entry(self, entry: Entry) -> Optional[Entry]:
try:
FFMPEG.run(ffmpeg_args)
except Exception as exc:
raise ValidationException(
f"ffmpeg_post_process_args {' '.join(ffmpeg_args)} result in an error"
) from exc
err_msg = f"ffmpeg_post_process_args {' '.join(ffmpeg_args)} result in an error"
if isinstance(exc, CalledProcessError):
err_msg += f":\n{exc.stderr.decode('utf-8')}"
raise ValidationException(err_msg) from exc

if not os.path.isfile(tmp_output_file):
raise ValidationException(
Expand Down
Loading