This commit is contained in:
nathannathant 2021-03-02 19:35:58 -08:00
parent e45ce11439
commit 8d67d9d619

View File

@ -99,7 +99,9 @@ class QobuzDL:
os.makedirs(fix, exist_ok=True)
return fix
def get_url_info(url: str) -> Tuple[str, str]:
def get_url_info(self, url: str) -> Tuple[str, str]:
'''Returns the type of the url and the id.
'''
r = re.search(
r"(?:https:\/\/(?:w{3}|open|play)\.qobuz\.com)?(?:\/[a-z]{2}-[a-z]{2})"
r"?\/(album|artist|track|playlist|label)(?:\/[-\w\d]+)?\/([\w\d]+)",
@ -152,7 +154,7 @@ class QobuzDL:
"track": {"album": False, "func": None, "iterable_key": None},
}
try:
url_type, item_id = self.get_info(url)
url_type, item_id = self.get_url_info(url)
type_dict = possibles[url_type]
except (KeyError, IndexError):
logger.info(