mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-09-02 17:21:39 +03:00
changed report_error to PostProcessingError
This commit is contained in:
@@ -585,7 +585,7 @@ class FFmpegVideoRemuxerPP(FFmpegVideoConvertorPP):
|
|||||||
|
|
||||||
|
|
||||||
class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
|
class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
|
||||||
AUDIO_EXTS = ('mp3','m4a','flac','opus','acc')
|
AUDIO_EXTS = ('mp3','m4a','flac','opus')
|
||||||
SUPPORTED_EXTS = ('mp4', 'mov', 'm4a', 'webm', 'mkv', 'mka')
|
SUPPORTED_EXTS = ('mp4', 'mov', 'm4a', 'webm', 'mkv', 'mka')
|
||||||
|
|
||||||
def __init__(self, downloader=None, already_have_subtitle=False):
|
def __init__(self, downloader=None, already_have_subtitle=False):
|
||||||
@@ -671,7 +671,7 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
|
|||||||
audio_file = input_files[0]
|
audio_file = input_files[0]
|
||||||
subs = input_files[1]
|
subs = input_files[1]
|
||||||
if not subs.endswith('.lrc'):
|
if not subs.endswith('.lrc'):
|
||||||
self.report_error('LRC subtitles required. Use "--convert-subs lrc" to convert')
|
raise PostProcessingError('LRC subtitles required. Use "--convert-subs lrc" to convert')
|
||||||
else:
|
else:
|
||||||
with open(subs, 'r', encoding='utf-8') as f:
|
with open(subs, 'r', encoding='utf-8') as f:
|
||||||
lyrics=f.read().strip()
|
lyrics=f.read().strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user