Skip to content

Commit

Permalink
fix lyrics search (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
iiKurt authored Oct 27, 2024
1 parent 4ea7d35 commit ee6c7fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lyricsgenius/genius.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ def _get_item_from_search_response(self, response, search_term, type_, result_ty
sections = sorted(response['sections'],
key=lambda sect: sect['type'] == type_)

hits = [hit for hit in top_hits if hit['type'] == type_]
hits = [hit for hit in top_hits if hit['index'] == type_]
hits.extend([hit for section in sections
for hit in section['hits']
if hit['type'] == type_])
if hit['index'] == type_])

for hit in hits:
item = hit['result']
Expand Down

0 comments on commit ee6c7fb

Please sign in to comment.