Skip to content

Commit

Permalink
Removed duplicate ARL verification when using search
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalec committed Jun 28, 2023
1 parent 8b346b4 commit 840ba65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deemon/cmd/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_best_result(self, api_result) -> list:
return []

def prompt_search(self, value, api_result):
menu = search.Search()
menu = search.Search(active_api=self.api)
ask_user = menu.artist_menu(value, api_result, True)
if ask_user:
return {'id': ask_user['id'], 'name': ask_user['name']}
Expand Down
6 changes: 3 additions & 3 deletions deemon/cmd/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@


class Search:
def __init__(self):
self.api = api.PlatformAPI()
def __init__(self, active_api=None):
self.api = active_api or api.PlatformAPI()
self.artist_id: int = None
self.artist: str = None
self.choices: list = []
Expand Down Expand Up @@ -457,7 +457,7 @@ def filter_choices(self, choices):

def start_queue(self):
self.clear()
dl = download.Download()
dl = download.Download(active_api=self.api)
dl.queue_list = self.queue_list
download_result = dl.download_queue()
self.queue_list.clear()
Expand Down

0 comments on commit 840ba65

Please sign in to comment.