|
6 | 6 |
|
7 | 7 | from ytdl_sub.prebuilt_presets import PREBUILT_PRESETS |
8 | 8 | from ytdl_sub.utils.system import IS_WINDOWS |
| 9 | +from ytdl_sub.validators.file_path_validators import ExistingFileValidator |
9 | 10 | from ytdl_sub.validators.strict_dict_validator import StrictDictValidator |
10 | 11 | from ytdl_sub.validators.validators import LiteralDictValidator |
11 | 12 | from ytdl_sub.validators.validators import StringValidator |
@@ -39,12 +40,11 @@ def __init__(self, name: str, value: Any): |
39 | 40 | self._lock_directory = self._validate_key( |
40 | 41 | key="lock_directory", validator=StringValidator, default=_DEFAULT_LOCK_DIRECTORY |
41 | 42 | ) |
42 | | - # TODO: Validate these exist |
43 | 43 | self._ffmpeg_path = self._validate_key( |
44 | | - key="ffmpeg_path", validator=StringValidator, default=_DEFAULT_FFMPEG_PATH |
| 44 | + key="ffmpeg_path", validator=ExistingFileValidator, default=_DEFAULT_FFMPEG_PATH |
45 | 45 | ) |
46 | 46 | self._ffprobe_path = self._validate_key( |
47 | | - key="ffprobe_path", validator=StringValidator, default=_DEFAULT_FFPROBE_PATH |
| 47 | + key="ffprobe_path", validator=ExistingFileValidator, default=_DEFAULT_FFPROBE_PATH |
48 | 48 | ) |
49 | 49 |
|
50 | 50 | @property |
@@ -102,14 +102,16 @@ def lock_directory(self) -> str: |
102 | 102 | @property |
103 | 103 | def ffmpeg_path(self) -> str: |
104 | 104 | """ |
105 | | - TODO: Fill out! |
| 105 | + Optional. Path to ffmpeg executable. Defaults to ``/usr/bin/ffmpeg`` for Linux, and |
| 106 | + ``ffmpeg.exe`` for Windows (in the same directory as ytdl-sub). |
106 | 107 | """ |
107 | 108 | return self._ffmpeg_path.value |
108 | 109 |
|
109 | 110 | @property |
110 | 111 | def ffprobe_path(self) -> str: |
111 | 112 | """ |
112 | | - TODO: Fill out! |
| 113 | + Optional. Path to ffprobe executable. Defaults to ``/usr/bin/ffprobe`` for Linux, and |
| 114 | + ``ffprobe.exe`` for Windows (in the same directory as ytdl-sub). |
113 | 115 | """ |
114 | 116 | return self._ffprobe_path.value |
115 | 117 |
|
|
0 commit comments