clean up requirements
This commit is contained in:
parent
0545ada1f8
commit
82e6c80933
6 changed files with 14 additions and 18 deletions
|
|
@ -1,15 +1,7 @@
|
||||||
argparse==1.4.0
|
argparse==1.4.0
|
||||||
black==21.11b1
|
|
||||||
coverage==6.3.2
|
|
||||||
dicttoxml==1.7.4
|
dicttoxml==1.7.4
|
||||||
isort==5.10.1
|
|
||||||
jsonschema==4.4.0
|
|
||||||
mergedeep==1.3.4
|
mergedeep==1.3.4
|
||||||
music-tag==0.4.3
|
music-tag==0.4.3
|
||||||
pathvalidate==2.4.1
|
|
||||||
Pillow==8.3.2
|
Pillow==8.3.2
|
||||||
pylint==2.13.3
|
PyYAML==6.0
|
||||||
pytest==7.1.1
|
|
||||||
pyYAML==5.4.1
|
|
||||||
sanitize-filename==1.2.0
|
|
||||||
yt-dlp==2022.4.8
|
yt-dlp==2022.4.8
|
||||||
6
requirements_dev.txt
Normal file
6
requirements_dev.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
-r requirements.txt
|
||||||
|
black==21.11b1
|
||||||
|
coverage==6.3.2
|
||||||
|
isort==5.10.1
|
||||||
|
pylint==2.13.3
|
||||||
|
pytest==7.1.1
|
||||||
|
|
@ -4,7 +4,7 @@ from typing import Any
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from sanitize_filename import sanitize
|
from yt_dlp.utils import sanitize_filename
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|
@ -80,7 +80,7 @@ class Entry(BaseEntry):
|
||||||
@property
|
@property
|
||||||
def sanitized_title(self) -> str:
|
def sanitized_title(self) -> str:
|
||||||
"""Returns the entry's sanitized title"""
|
"""Returns the entry's sanitized title"""
|
||||||
return sanitize(self.title)
|
return sanitize_filename(self.title)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ext(self) -> str:
|
def ext(self) -> str:
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ from typing import Dict
|
||||||
from typing import List
|
from typing import List
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from sanitize_filename import sanitize
|
from yt_dlp.utils import sanitize_filename
|
||||||
|
|
||||||
from ytdl_subscribe.entries.entry import Entry
|
from ytdl_subscribe.entries.entry import Entry
|
||||||
from ytdl_subscribe.entries.entry import PlaylistMetadata
|
from ytdl_subscribe.entries.entry import PlaylistMetadata
|
||||||
|
|
@ -32,7 +32,7 @@ class SoundcloudTrack(Entry):
|
||||||
@property
|
@property
|
||||||
def sanitized_album(self) -> str:
|
def sanitized_album(self) -> str:
|
||||||
"""Returns the entry's sanitized album name"""
|
"""Returns the entry's sanitized album name"""
|
||||||
return sanitize(self.album)
|
return sanitize_filename(self.album)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def album_year(self) -> int:
|
def album_year(self) -> int:
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ class Subscription(Generic[SourceT], ABC):
|
||||||
ytdl_options = dict(ytdl_options, **source_ytdl_options)
|
ytdl_options = dict(ytdl_options, **source_ytdl_options)
|
||||||
|
|
||||||
return downloader_type(
|
return downloader_type(
|
||||||
output_directory=self.working_directory,
|
working_directory=self.working_directory,
|
||||||
ytdl_options=ytdl_options,
|
ytdl_options=ytdl_options,
|
||||||
download_archive_file_name=self._enhanced_download_archive.archive_file_name,
|
download_archive_file_name=self._enhanced_download_archive.archive_file_name,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import sanitize_filename
|
from yt_dlp.utils import sanitize_filename
|
||||||
|
|
||||||
from ytdl_subscribe.validators.base.string_formatter_validators import DictFormatterValidator
|
from ytdl_subscribe.validators.base.string_formatter_validators import DictFormatterValidator
|
||||||
from ytdl_subscribe.validators.base.string_formatter_validators import StringFormatterValidator
|
from ytdl_subscribe.validators.base.string_formatter_validators import StringFormatterValidator
|
||||||
|
|
@ -12,9 +12,7 @@ class OverridesValidator(DictFormatterValidator):
|
||||||
for key in self._keys:
|
for key in self._keys:
|
||||||
sanitized_key_name = f"sanitized_{key}"
|
sanitized_key_name = f"sanitized_{key}"
|
||||||
# First, sanitize the format string
|
# First, sanitize the format string
|
||||||
self._value[sanitized_key_name] = sanitize_filename.sanitize(
|
self._value[sanitized_key_name] = sanitize_filename(self._value[key].format_string)
|
||||||
self._value[key].format_string
|
|
||||||
)
|
|
||||||
|
|
||||||
# Then, convert it into a StringFormatterValidator
|
# Then, convert it into a StringFormatterValidator
|
||||||
self._value[sanitized_key_name] = StringFormatterValidator(
|
self._value[sanitized_key_name] = StringFormatterValidator(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue