This isn't really worth its own commit but I'm going to bed now

This commit is contained in:
krateng 2023-10-28 02:17:40 +02:00
parent 56030acf0e
commit 4969d9c035
2 changed files with 3 additions and 1 deletions

View File

@ -427,7 +427,8 @@ def get_charts_albums(dbconn=None,resolve_ids=True,only_own_albums=False,**keys)
if 'artist' in keys:
result = sqldb.count_scrobbles_by_album_combined(since=since,to=to,artist=keys['artist'],associated=keys.get('associated',False),resolve_ids=resolve_ids,dbconn=dbconn)
result = [e for e in result if (not only_own_albums) or (keys['artist'] in (e['album']['artists'] or []))]
if only_own_albums:
result = [e for e in result if keys['artist'] in (e['album']['artists'] or [])]
else:
result = sqldb.count_scrobbles_by_album(since=since,to=to,resolve_ids=resolve_ids,dbconn=dbconn)
return result

View File

@ -323,6 +323,7 @@ def album_dict_to_db(info,dbconn=None):
##### Actual Database interactions
# TODO: remove all resolve_id args and do that logic outside the caching
@connection_provider
def add_scrobble(scrobbledict,update_album=False,dbconn=None):