get_artist_of_disc con cache

This commit is contained in:
Daniel Cortes
2020-06-09 04:49:39 -04:00
parent cabe607958
commit b44c18770e
3 changed files with 23 additions and 17 deletions

View File

@@ -147,7 +147,7 @@ def load_artist_on_cache(artist):
offset = 0
while True:
release_groups = mb.browse_release_groups({'artist': mbid}, limit=100, offset=offset)
if f'artist_{mbid}:release_group_count' in redis:
if f'artist_{mbid}:release_group_count' not in redis:
redis.set(f'artist_{mbid}:release_group_count',
release_groups.get('release_group_count'))
for release_group in release_groups.get('release_groups'):