Cache para los cover arts
Aparte hice un metodo que cambia http a https dentro de map_coverart, porque por alguna razon cover art archive retorna sus imagenes con http y los navegdores se quejan por esto
This commit is contained in:
@@ -242,3 +242,25 @@ def get_artist_of_recording(mbid):
|
||||
|
||||
_log.debug('Se encontro el artista')
|
||||
return json.loads(artist)
|
||||
|
||||
|
||||
def get_cover_art_disc(mbid):
|
||||
_log.info('Intentando obtener el cover art del disco %s', mbid)
|
||||
|
||||
with get_redis_connection() as redis:
|
||||
covers = redis.get(f'release_group:{mbid}:cover_art')
|
||||
if not covers:
|
||||
return None
|
||||
|
||||
return json.loads(covers)
|
||||
|
||||
|
||||
def get_cover_art_release(mbid):
|
||||
_log.info('Intentando obtener el cover art de la release %s', mbid)
|
||||
|
||||
with get_redis_connection() as redis:
|
||||
covers = redis.get(f'release:{mbid}:cover_art')
|
||||
if not covers:
|
||||
return None
|
||||
|
||||
return json.loads(covers)
|
||||
|
||||
Reference in New Issue
Block a user