mirror of
https://github.com/krateng/maloja.git
synced 2025-06-10 20:32:28 +03:00
This isn't really worth its own commit but I'm going to bed now
This commit is contained in:
parent
56030acf0e
commit
4969d9c035
@ -427,7 +427,8 @@ def get_charts_albums(dbconn=None,resolve_ids=True,only_own_albums=False,**keys)
|
|||||||
|
|
||||||
if 'artist' in 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 = 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:
|
else:
|
||||||
result = sqldb.count_scrobbles_by_album(since=since,to=to,resolve_ids=resolve_ids,dbconn=dbconn)
|
result = sqldb.count_scrobbles_by_album(since=since,to=to,resolve_ids=resolve_ids,dbconn=dbconn)
|
||||||
return result
|
return result
|
||||||
|
@ -323,6 +323,7 @@ def album_dict_to_db(info,dbconn=None):
|
|||||||
|
|
||||||
##### Actual Database interactions
|
##### Actual Database interactions
|
||||||
|
|
||||||
|
# TODO: remove all resolve_id args and do that logic outside the caching
|
||||||
|
|
||||||
@connection_provider
|
@connection_provider
|
||||||
def add_scrobble(scrobbledict,update_album=False,dbconn=None):
|
def add_scrobble(scrobbledict,update_album=False,dbconn=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user