From ef08dca088613fe176f006a1dd6ecc316255f1e8 Mon Sep 17 00:00:00 2001 From: Hellow2 Date: Tue, 18 Apr 2023 13:27:03 +0200 Subject: [PATCH] implemented the blacklist --- src/music_kraken/pages/abstract.py | 2 +- src/music_kraken/utils/shared.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/music_kraken/pages/abstract.py b/src/music_kraken/pages/abstract.py index e049b1f..659c246 100644 --- a/src/music_kraken/pages/abstract.py +++ b/src/music_kraken/pages/abstract.py @@ -314,7 +314,7 @@ class Page: override_existing: bool = False, create_target_on_demand: bool = True, download_all: bool = False, - exclude_album_type: Set[AlbumType] = None + exclude_album_type: Set[AlbumType] = shared.ALBUM_TYPE_BLACKLIST ) -> DownloadResult: """ diff --git a/src/music_kraken/utils/shared.py b/src/music_kraken/utils/shared.py index ce14bfa..782a1e8 100644 --- a/src/music_kraken/utils/shared.py +++ b/src/music_kraken/utils/shared.py @@ -1,7 +1,7 @@ import logging import random from pathlib import Path -from typing import List, Tuple +from typing import List, Tuple, Set from .path_manager import LOCATIONS from .config import LOGGING_SECTION, AUDIO_SECTION, CONNECTION_SECTION, MISC_SECTION, PATHS_SECTION @@ -101,4 +101,4 @@ SHOW_DOWNLOAD_ERRORS_THRESHOLD = CONNECTION_SECTION.SHOW_DOWNLOAD_ERRORS_THRESHO SORT_BY_DATE = AUDIO_SECTION.SORT_BY_DATE.object_from_value SORT_BY_ALBUM_TYPE = AUDIO_SECTION.SORT_BY_ALBUM_TYPE.object_from_value -ALBUM_TYPE_BLACKLIST: List[AlbumType] = AUDIO_SECTION.ALBUM_TYPE_BLACKLIST.object_from_value +ALBUM_TYPE_BLACKLIST: Set[AlbumType] = set(AUDIO_SECTION.ALBUM_TYPE_BLACKLIST.object_from_value)