Skip to content

Commit

Permalink
Fix exception for album search results with missing year
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Dec 18, 2020
1 parent 95d69fe commit 09a3007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ytmusicapi/parsers/browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def parse_search_results(self, results, resultType=None):
search_result['title'] = get_item_text(data, 0)
search_result['type'] = get_item_text(data, 1)
search_result['artist'] = get_item_text(data, 1, 2)
search_result['year'] = get_item_text(data, 1, 4)
search_result['year'] = get_item_text(data, 1, 4, True)

elif resultType in ['playlist']:
search_result['title'] = get_item_text(data, 0)
Expand Down

0 comments on commit 09a3007

Please sign in to comment.