[REFACTOR] init ffmpeg paths in config initialize function
This commit is contained in:
parent
7b7a4f8ab1
commit
801504f0ba
2 changed files with 6 additions and 7 deletions
|
|
@ -3,6 +3,7 @@ from typing import Any
|
|||
|
||||
from ytdl_sub.config.config_validator import ConfigValidator
|
||||
from ytdl_sub.config.preset import Preset
|
||||
from ytdl_sub.utils.ffmpeg import FFMPEG
|
||||
from ytdl_sub.utils.yaml import load_yaml
|
||||
|
||||
|
||||
|
|
@ -26,6 +27,11 @@ class ConfigFile(ConfigValidator):
|
|||
if self.config_options.umask:
|
||||
os.umask(int(self.config_options.umask, 8))
|
||||
|
||||
FFMPEG.set_paths(
|
||||
ffmpeg_path=self.config_options.ffmpeg_path,
|
||||
ffprobe_path=self.config_options.ffprobe_path,
|
||||
)
|
||||
|
||||
return self
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ from ytdl_sub.subscriptions.base_subscription import BaseSubscription
|
|||
from ytdl_sub.subscriptions.subscription_ytdl_options import SubscriptionYTDLOptions
|
||||
from ytdl_sub.utils.datetime import to_date_range
|
||||
from ytdl_sub.utils.exceptions import ValidationException
|
||||
from ytdl_sub.utils.ffmpeg import FFMPEG
|
||||
from ytdl_sub.utils.file_handler import FileHandler
|
||||
from ytdl_sub.utils.file_handler import FileHandlerTransactionLog
|
||||
from ytdl_sub.utils.file_handler import FileMetadata
|
||||
|
|
@ -266,12 +265,6 @@ class SubscriptionDownload(BaseSubscription, ABC):
|
|||
If true, do not download any video/audio files or move anything to the output
|
||||
directory.
|
||||
"""
|
||||
# Set ffmpeg paths
|
||||
FFMPEG.set_paths(
|
||||
ffmpeg_path=self._config_options.ffmpeg_path,
|
||||
ffprobe_path=self._config_options.ffprobe_path,
|
||||
)
|
||||
|
||||
self._enhanced_download_archive.reinitialize(dry_run=dry_run)
|
||||
plugins = self._initialize_plugins()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue