Исправление работы --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]
|
||||
name = "yandex-music-downloader"
|
||||
version = "3.2.0b1"
|
||||
version = "3.2.0b2"
|
||||
description = "Загрузчик музыки с сервиса Яндекс.Музыка"
|
||||
requires-python = ">=3.9"
|
||||
readme = "README.md"
|
||||
|
|
|
|||
|
|
@ -250,8 +250,11 @@ def main():
|
|||
track,
|
||||
args.unsafe_path,
|
||||
)
|
||||
if args.skip_existing and save_path.is_file():
|
||||
continue
|
||||
if args.skip_existing:
|
||||
if any(
|
||||
save_path.with_suffix(s).is_file() for s in core.AUDIO_FILE_SUFFIXES
|
||||
):
|
||||
continue
|
||||
|
||||
save_dir = save_path.parent
|
||||
if not save_dir.is_dir():
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ DEFAULT_COVER_RESOLUTION = 400
|
|||
MIN_COMPATIBILITY_LEVEL = 0
|
||||
MAX_COMPATIBILITY_LEVEL = 1
|
||||
|
||||
AUDIO_FILE_SUFFIXES = {".mp3", ".flac", ".m4a"}
|
||||
|
||||
|
||||
@dataclass
|
||||
class DownloadableTrack:
|
||||
|
|
|
|||
Loading…
Reference in a new issue