get_charts: fix unavailable song error in trending section

This commit is contained in:
sigma67 2022-01-30 14:50:41 +01:00
commit 2e8c09a430
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
3 changed files with 15 additions and 9 deletions

View file

@ -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