From 5cdd4fb6a9df0fc05053d19de453e506fb525d74 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Mon, 27 May 2024 14:16:00 +0200 Subject: [PATCH] feat: renamed pages --- music_kraken/cli/main_downloader.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/music_kraken/cli/main_downloader.py b/music_kraken/cli/main_downloader.py index d2c989a..6b834ef 100644 --- a/music_kraken/cli/main_downloader.py +++ b/music_kraken/cli/main_downloader.py @@ -70,7 +70,7 @@ class CliDownloader: genre: str = None, process_metadata_anyway: bool = False, ) -> None: - self.pages: Downloader = Downloader(exclude_pages=exclude_pages, exclude_shady=exclude_shady) + self.downloader: Downloader = Downloader(exclude_pages=exclude_pages, exclude_shady=exclude_shady) self.page_dict: Dict[str, Type[Page]] = dict() @@ -159,7 +159,7 @@ class CliDownloader: def search(self, query: str): if re.match(URL_PATTERN, query) is not None: try: - page, data_object = self.pages.fetch_url(query) + data_object = self.downloader.fetch_url(query) except UrlNotFoundException as e: print(f"{e.url} could not be attributed/parsed to any yet implemented site.\n" f"PR appreciated if the site isn't implemented.\n" @@ -213,13 +213,13 @@ class CliDownloader: parsed_query: Query = self._process_parsed(key_text, query) - self.set_current_options(self.pages.search(parsed_query)) + self.set_current_options(self.downloader.search(parsed_query)) self.print_current_options() def goto(self, data_object: DatabaseObject): page: Type[Page] - self.pages.fetch_details(data_object, stop_at_level=1) + self.downloader.fetch_details(data_object, stop_at_level=1) self.set_current_options(GoToResults(data_object.options, max_items_per_page=self.max_displayed_options)) @@ -233,7 +233,7 @@ class CliDownloader: _result_map: Dict[DatabaseObject, DownloadResult] = dict() for database_object in data_objects: - r = self.pages.download( + r = self.downloader.download( data_object=database_object, genre=self.genre, **kwargs @@ -320,7 +320,7 @@ class CliDownloader: if do_fetch: for data_object in selected_objects: - self.pages.fetch_details(data_object) + self.downloader.fetch_details(data_object) self.print_current_options() return False