1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added status to more API endpoints

This commit is contained in:
krateng 2022-04-25 22:54:53 +02:00
parent 8a44d3def2
commit c77b7c952f
2 changed files with 11 additions and 1 deletions

View File

@ -202,6 +202,7 @@ def get_scrobbles_external(**keys):
if k_amount.get('perpage') is not math.inf: result = result[:k_amount.get('perpage')] if k_amount.get('perpage') is not math.inf: result = result[:k_amount.get('perpage')]
return { return {
"status":"ok",
"list":result "list":result
} }
@ -221,6 +222,7 @@ def get_scrobbles_num_external(**keys):
result = database.get_scrobbles_num(**ckeys) result = database.get_scrobbles_num(**ckeys)
return { return {
"status":"ok",
"amount":result "amount":result
} }
@ -241,6 +243,7 @@ def get_tracks_external(**keys):
result = database.get_tracks(**ckeys) result = database.get_tracks(**ckeys)
return { return {
"status":"ok",
"list":result "list":result
} }
@ -257,6 +260,7 @@ def get_artists_external():
result = database.get_artists() result = database.get_artists()
return { return {
"status":"ok",
"list":result "list":result
} }
@ -278,6 +282,7 @@ def get_charts_artists_external(**keys):
result = database.get_charts_artists(**ckeys) result = database.get_charts_artists(**ckeys)
return { return {
"status":"ok",
"list":result "list":result
} }
@ -297,6 +302,7 @@ def get_charts_tracks_external(**keys):
result = database.get_charts_tracks(**ckeys) result = database.get_charts_tracks(**ckeys)
return { return {
"status":"ok",
"list":result "list":result
} }
@ -317,6 +323,7 @@ def get_pulse_external(**keys):
results = database.get_pulse(**ckeys) results = database.get_pulse(**ckeys)
return { return {
"status":"ok",
"list":results "list":results
} }
@ -337,6 +344,7 @@ def get_performance_external(**keys):
results = database.get_performance(**ckeys) results = database.get_performance(**ckeys)
return { return {
"status":"ok",
"list":results "list":results
} }
@ -357,6 +365,7 @@ def get_top_artists_external(**keys):
results = database.get_top_artists(**ckeys) results = database.get_top_artists(**ckeys)
return { return {
"status":"ok",
"list":results "list":results
} }
@ -379,6 +388,7 @@ def get_top_tracks_external(**keys):
results = database.get_top_tracks(**ckeys) results = database.get_top_tracks(**ckeys)
return { return {
"status":"ok",
"list":results "list":results
} }

View File

@ -954,7 +954,7 @@ def merge_duplicate_tracks(artist_id,dbconn=None):
for track in track_identifiers: for track in track_identifiers:
if len(track_identifiers[track]) > 1: if len(track_identifiers[track]) > 1:
target,*src = track_identifiers[track] target,*src = track_identifiers[track]
merge_tracks(target,src) merge_tracks(target,src,dbconn=dbconn)