This commit is contained in:
2025-04-26 19:47:12 -04:00
parent 6c29c6fede
commit 58ba471b5e
10 changed files with 94 additions and 56 deletions

View File

@ -50,7 +50,8 @@ class LastFM:
.split("<a href")[0],
}
return ret_obj
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
traceback.print_exc()
return {
"err": "Failed",
@ -101,8 +102,9 @@ class LastFM:
"album": album,
}
return ret_obj
except:
except Exception as e:
traceback.print_exc()
logging.debug("Exception: %s", str(e))
return {
"err": "General Failure",
}
@ -132,8 +134,9 @@ class LastFM:
return ret_obj
except:
except Exception as e:
traceback.print_exc()
logging.debug("Exception: %s", str(e))
return {
"err": "General Failure",
}
@ -178,7 +181,8 @@ class LastFM:
and int(item.get("playcount")) >= 50
]
return ret_obj
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
traceback.print_exc()
return {
"err": "Failed",
@ -201,7 +205,8 @@ class LastFM:
return -1
artist_id: int = int(artist_search[0].get("id", 0))
return artist_id
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
traceback.print_exc()
return -1
@ -252,7 +257,8 @@ class LastFM:
"members": members,
}
return ret_obj
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
traceback.print_exc()
return {
"err": "Failed",
@ -284,7 +290,8 @@ class LastFM:
"err": "Failed",
}
return artist_info
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
traceback.print_exc()
return {
"err": "Failed",
@ -337,7 +344,8 @@ class LastFM:
}
try:
track_key: list = data.get("tracks", None).get("track")
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
track_key = []
if isinstance(track_key, list):
ret_obj["tracks"] = [
@ -357,7 +365,8 @@ class LastFM:
}
]
return ret_obj
except:
except Exception as e:
logging.debug("Exception: %s", str(e))
traceback.print_exc()
return {
"err": "Failed",