Исправление работы --skip-existing
This commit is contained in:
parent
c04415c08a
commit
0639ea15fc
3 changed files with 8 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "yandex-music-downloader"
|
name = "yandex-music-downloader"
|
||||||
version = "3.2.0b1"
|
version = "3.2.0b2"
|
||||||
description = "Загрузчик музыки с сервиса Яндекс.Музыка"
|
description = "Загрузчик музыки с сервиса Яндекс.Музыка"
|
||||||
requires-python = ">=3.9"
|
requires-python = ">=3.9"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
|
|
@ -250,7 +250,10 @@ def main():
|
||||||
track,
|
track,
|
||||||
args.unsafe_path,
|
args.unsafe_path,
|
||||||
)
|
)
|
||||||
if args.skip_existing and save_path.is_file():
|
if args.skip_existing:
|
||||||
|
if any(
|
||||||
|
save_path.with_suffix(s).is_file() for s in core.AUDIO_FILE_SUFFIXES
|
||||||
|
):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
save_dir = save_path.parent
|
save_dir = save_path.parent
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ DEFAULT_COVER_RESOLUTION = 400
|
||||||
MIN_COMPATIBILITY_LEVEL = 0
|
MIN_COMPATIBILITY_LEVEL = 0
|
||||||
MAX_COMPATIBILITY_LEVEL = 1
|
MAX_COMPATIBILITY_LEVEL = 1
|
||||||
|
|
||||||
|
AUDIO_FILE_SUFFIXES = {".mp3", ".flac", ".m4a"}
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class DownloadableTrack:
|
class DownloadableTrack:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue