get_charts: fix unavailable song error in trending section
This commit is contained in:
parent
7bc65ba15c
commit
2e8c09a430
3 changed files with 15 additions and 9 deletions
|
|
@ -172,3 +172,12 @@ def find_objects_by_key(object_list, key, nested=None):
|
|||
if key in item:
|
||||
objects.append(item)
|
||||
return objects
|
||||
|
||||
|
||||
def get_dot_separator_index(runs):
|
||||
index = len(runs)
|
||||
try:
|
||||
index = runs.index({'text': ' • '})
|
||||
except ValueError:
|
||||
len(runs)
|
||||
return index
|
||||
|
|
|
|||
Loading…
Reference in a new issue