From 3cb35909d1eaf8818924a79da398cf2a6eb5731d Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Fri, 17 May 2024 13:31:46 +0200 Subject: [PATCH] feat: added option to just fetch the objects in select --- music_kraken/cli/main_downloader.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/music_kraken/cli/main_downloader.py b/music_kraken/cli/main_downloader.py index 38d20cf..b443ac0 100644 --- a/music_kraken/cli/main_downloader.py +++ b/music_kraken/cli/main_downloader.py @@ -354,14 +354,12 @@ class Downloader: command, query = _[0], ":".join(_[1:]) do_search = "s" in command + do_fetch = "f" in command do_download = "d" in command do_merge = "m" in command - if do_search and do_download: - raise MKInvalidInputException(message="You can't search and download at the same time.") - - if do_search and do_merge: - raise MKInvalidInputException(message="You can't search and merge at the same time.") + if do_search and (do_download or do_fetch or do_merge): + raise MKInvalidInputException(message="You can't search and do another operation at the same time.") if do_search: self.search(":".join(input_str.split(":")[1:])) @@ -397,6 +395,13 @@ class Downloader: selected_objects = [a] + if do_fetch: + for data_object in selected_objects: + self.pages.fetch_details(data_object) + + self.print_current_options() + return False + if do_download: self.download(selected_objects) return False