From a5b3615a7a3a5f8776e651e0bfc870c916da5423 Mon Sep 17 00:00:00 2001 From: jbannon Date: Fri, 22 Apr 2022 21:23:31 +0000 Subject: [PATCH] SC working again --- config.yaml | 1 - ytdl_subscribe/config/preset_options.py | 2 +- ytdl_subscribe/downloaders/soundcloud_downloader.py | 2 +- ytdl_subscribe/main.py | 6 ++++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config.yaml b/config.yaml index 36e37c47..127a37be 100644 --- a/config.yaml +++ b/config.yaml @@ -55,7 +55,6 @@ presets: file_name: "{output_file_name}.{ext}" convert_thumbnail: "jpeg" thumbnail_name: "{output_file_name}.jpg" - maintain_download_archive: True convert_thumbnail: to: "jpg" nfo_tags: diff --git a/ytdl_subscribe/config/preset_options.py b/ytdl_subscribe/config/preset_options.py index 16fbd020..b6807617 100644 --- a/ytdl_subscribe/config/preset_options.py +++ b/ytdl_subscribe/config/preset_options.py @@ -79,7 +79,7 @@ class OutputOptions(StrictDictValidator): key="maintain_download_archive", validator=BoolValidator, default=False ) self.maintain_stale_file_deletion = self._validate_key_if_present( - key="maintain_stale_file_deletion", validator=DateRangeValidator, default=False + key="maintain_stale_file_deletion", validator=DateRangeValidator ) if self.maintain_stale_file_deletion and not self.maintain_download_archive: diff --git a/ytdl_subscribe/downloaders/soundcloud_downloader.py b/ytdl_subscribe/downloaders/soundcloud_downloader.py index a16811ec..83890c88 100644 --- a/ytdl_subscribe/downloaders/soundcloud_downloader.py +++ b/ytdl_subscribe/downloaders/soundcloud_downloader.py @@ -99,7 +99,7 @@ class SoundcloudAlbumsAndSinglesDownloadOptions(SoundcloudDownloaderOptions): class SoundcloudAlbumsAndSinglesDownloader( SoundcloudDownloader[SoundcloudAlbumsAndSinglesDownloadOptions] ): - downloader_options_type = SoundcloudDownloaderOptions + downloader_options_type = SoundcloudAlbumsAndSinglesDownloadOptions def download(self) -> List[SoundcloudTrack]: """ diff --git a/ytdl_subscribe/main.py b/ytdl_subscribe/main.py index 6f616c90..ced0fe2c 100644 --- a/ytdl_subscribe/main.py +++ b/ytdl_subscribe/main.py @@ -9,6 +9,8 @@ from ytdl_subscribe.config.config_file import ConfigFile from ytdl_subscribe.config.subscription import SubscriptionValidator from ytdl_subscribe.utils.exceptions import ValidationException +DEBUGGER_MODE = True + def _download_subscriptions_from_yaml_files(config: ConfigFile, args: argparse.Namespace) -> None: """ @@ -66,9 +68,13 @@ if __name__ == "__main__": try: _main() except ValidationException as validation_exception: + if DEBUGGER_MODE: + raise print(validation_exception) sys.exit(1) except Exception as exc: # pylint: disable=broad-except + if DEBUGGER_MODE: + raise print(traceback.format_exc()) print( "A fatal error occurred. Please copy and paste the stacktrace above and make a Github "