cleanup
This commit is contained in:
@ -10,14 +10,13 @@ from .constructors import ValidArtistSearchRequest, ValidAlbumDetailRequest,\
|
||||
|
||||
class LastFM(FastAPI):
|
||||
"""Last.FM Endpoints"""
|
||||
def __init__(self, app: FastAPI, util, constants, glob_state) -> None: # pylint: disable=super-init-not-called
|
||||
def __init__(self, app: FastAPI, util, constants) -> None: # pylint: disable=super-init-not-called
|
||||
self.app = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
self.glob_state = glob_state
|
||||
self.lastfm = importlib.import_module("lastfm_wrapper").LastFM()
|
||||
|
||||
self.endpoints = {
|
||||
self.endpoints: dict = {
|
||||
"lastfm/get_artist_by_name": self.artist_by_name_handler,
|
||||
"lastfm/get_artist_albums": self.artist_album_handler,
|
||||
"lastfm/get_release": self.release_detail_handler,
|
||||
@ -71,7 +70,7 @@ class LastFM(FastAPI):
|
||||
seen_release_titles: list = []
|
||||
|
||||
for release in album_result:
|
||||
release_title: str = release.get('title')
|
||||
release_title: str = release.get('title', 'Unknown')
|
||||
if release_title.lower() in seen_release_titles:
|
||||
continue
|
||||
seen_release_titles.append(release_title.lower())
|
||||
|
Reference in New Issue
Block a user