From b6c68e2156b10073518a5406d5179fbb9f721820 Mon Sep 17 00:00:00 2001 From: PhYrE Date: Wed, 24 Apr 2024 01:42:51 +0200 Subject: [PATCH] Add config for customized playlist padding. --- zotify/config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zotify/config.py b/zotify/config.py index 802d5ce..e655898 100644 --- a/zotify/config.py +++ b/zotify/config.py @@ -36,6 +36,7 @@ PRINT_WARNINGS = 'PRINT_WARNINGS' RETRY_ATTEMPTS = 'RETRY_ATTEMPTS' CONFIG_VERSION = 'CONFIG_VERSION' DOWNLOAD_LYRICS = 'DOWNLOAD_LYRICS' +PLAYLIST_NUM_PAD = 'PLAYLIST_NUM_PAD' CONFIG_VALUES = { SAVE_CREDENTIALS: { 'default': 'True', 'type': bool, 'arg': '--save-credentials' }, @@ -60,6 +61,7 @@ CONFIG_VALUES = { CHUNK_SIZE: { 'default': '20000', 'type': int, 'arg': '--chunk-size' }, DOWNLOAD_REAL_TIME: { 'default': 'False', 'type': bool, 'arg': '--download-real-time' }, LANGUAGE: { 'default': 'en', 'type': str, 'arg': '--language' }, + PLAYLIST_NUM_PAD: { 'default': '2', 'type': int, 'arg': '--playlist-num-pad' }, PRINT_SPLASH: { 'default': 'False', 'type': bool, 'arg': '--print-splash' }, PRINT_SKIPS: { 'default': 'True', 'type': bool, 'arg': '--print-skips' }, PRINT_DOWNLOAD_PROGRESS: { 'default': 'True', 'type': bool, 'arg': '--print-download-progress' }, @@ -197,6 +199,10 @@ class Config: def get_download_lyrics(cls) -> bool: return cls.get(DOWNLOAD_LYRICS) + @classmethod + def get_playlist_num_pad(cls) -> int: + return cls.get(PLAYLIST_NUM_PAD) + @classmethod def get_bulk_wait_time(cls) -> int: return cls.get(BULK_WAIT_TIME)