lint
This commit is contained in:
parent
6d7ef1b4bb
commit
1f8d247a18
2 changed files with 11 additions and 14 deletions
|
|
@ -95,11 +95,7 @@ class SubscriptionYTDLOptions:
|
||||||
|
|
||||||
if subtitle_options.embed_subtitles:
|
if subtitle_options.embed_subtitles:
|
||||||
builder.add(
|
builder.add(
|
||||||
{
|
{"postprocessors": [{"key": "FFmpegEmbedSubtitle", "already_have_subtitle": True}]}
|
||||||
"postprocessors": [
|
|
||||||
{"key": "FFmpegEmbedSubtitle", "already_have_subtitle": True}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if subtitle_options.subtitles_name:
|
if subtitle_options.subtitles_name:
|
||||||
|
|
|
||||||
|
|
@ -24,11 +24,12 @@ def single_video_subs_embed_preset_dict(output_directory):
|
||||||
"overrides": {"artist": "JMC"},
|
"overrides": {"artist": "JMC"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def test_single_video_subs_embed_and_file_preset_dict(single_video_subs_embed_preset_dict):
|
def test_single_video_subs_embed_and_file_preset_dict(single_video_subs_embed_preset_dict):
|
||||||
single_video_subs_embed_preset_dict['subtitles']['subtitles_name'] = (
|
single_video_subs_embed_preset_dict["subtitles"][
|
||||||
"{music_video_name}.{lang}.{subtitles_ext}"
|
"subtitles_name"
|
||||||
)
|
] = "{music_video_name}.{lang}.{subtitles_ext}"
|
||||||
return single_video_subs_embed_preset_dict
|
return single_video_subs_embed_preset_dict
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -61,11 +62,11 @@ class TestSubtitles:
|
||||||
|
|
||||||
@pytest.mark.parametrize("dry_run", [True, False])
|
@pytest.mark.parametrize("dry_run", [True, False])
|
||||||
def test_subtitles_embedded_and_file(
|
def test_subtitles_embedded_and_file(
|
||||||
self,
|
self,
|
||||||
music_video_config,
|
music_video_config,
|
||||||
test_single_video_subs_embed_and_file_preset_dict,
|
test_single_video_subs_embed_and_file_preset_dict,
|
||||||
output_directory,
|
output_directory,
|
||||||
dry_run,
|
dry_run,
|
||||||
):
|
):
|
||||||
subscription = Subscription.from_dict(
|
subscription = Subscription.from_dict(
|
||||||
config=music_video_config,
|
config=music_video_config,
|
||||||
|
|
@ -83,4 +84,4 @@ class TestSubtitles:
|
||||||
output_directory=output_directory,
|
output_directory=output_directory,
|
||||||
dry_run=dry_run,
|
dry_run=dry_run,
|
||||||
expected_download_summary_file_name="plugins/test_subtitles_embedded_and_file.json",
|
expected_download_summary_file_name="plugins/test_subtitles_embedded_and_file.json",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue