[DOCS] Warn if using deprecated download strategy (#321)
This commit is contained in:
parent
726da5b6be
commit
efb8ed5666
1 changed files with 11 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ from ytdl_sub.plugins.plugin import PluginOptions
|
|||
from ytdl_sub.prebuilt_presets import PREBUILT_PRESET_NAMES
|
||||
from ytdl_sub.prebuilt_presets import PUBLISHED_PRESET_NAMES
|
||||
from ytdl_sub.utils.exceptions import ValidationException
|
||||
from ytdl_sub.utils.logger import Logger
|
||||
from ytdl_sub.utils.yaml import dump_yaml
|
||||
from ytdl_sub.validators.strict_dict_validator import StrictDictValidator
|
||||
from ytdl_sub.validators.string_formatter_validators import DictFormatterValidator
|
||||
|
|
@ -47,6 +48,8 @@ PRESET_KEYS = {
|
|||
*PluginMapping.plugins(),
|
||||
}
|
||||
|
||||
logger = Logger.get()
|
||||
|
||||
|
||||
def _parent_preset_error_message(
|
||||
current_preset_name: str, parent_preset_name: str, presets: List[str]
|
||||
|
|
@ -181,6 +184,14 @@ class Preset(_PresetShell):
|
|||
name=f"{name}.{source_name}", value=source_dict
|
||||
)
|
||||
|
||||
if source_name != "download":
|
||||
logger.warning(
|
||||
"WARNING: Download strategy '%s' is deprecated and will be removed in ytdl-sub"
|
||||
"v0.6.0. See %s on how to update it",
|
||||
source_name,
|
||||
"https://ytdl-sub.readthedocs.io/en/latest/config.html#deprecation-updates",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def preset_partial_validate(cls, config: ConfigValidator, name: str, value: Any) -> None:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue