This commit is contained in:
Jesse Bannon 2023-07-24 10:55:21 -07:00
parent b68fba2825
commit b9ad72430d
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,4 @@
from typing import List
from typing import Optional
import mediafile
@ -43,7 +44,7 @@ class EmbedThumbnailPlugin(Plugin[EmbedThumbnailOptions]):
thumbnail_path = entry.get_download_thumbnail_path()
tmp_file_path = FFMPEG.tmp_file_path(file_path)
try:
cmd = [
ffmpeg_args: List[str] = [
"-i",
file_path,
"-i",
@ -60,7 +61,7 @@ class EmbedThumbnailPlugin(Plugin[EmbedThumbnailOptions]):
"attached_pic",
tmp_file_path,
]
FFMPEG.run(cmd)
FFMPEG.run(ffmpeg_args)
FileHandler.move(tmp_file_path, file_path)
finally:
FileHandler.delete(tmp_file_path)

View file

@ -51,7 +51,11 @@ class TestConfigFilePartiallyValidatesPresets:
@pytest.mark.parametrize("plugin", PluginMapping.plugins())
def test_success__empty_plugins(self, plugin: str):
self._partial_validate({plugin: {}})
excluded_plugins = [
"embed_thumbnail", # value is bool, not dict
]
if plugin not in excluded_plugins:
self._partial_validate({plugin: {}})
@pytest.mark.parametrize("source", DownloadStrategyMapping.sources())
def test_success__empty_sources(self, source: str):