Add isExplicit key to search results, update example

This commit is contained in:
sigma67 2021-01-28 17:09:24 +01:00
commit 7e84788b77
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
2 changed files with 68 additions and 10 deletions

View file

@ -115,6 +115,9 @@ class Parser:
search_result['releaseDate'] = runs[2]
search_result['resultType'] = 'album'
if resultType in ['song', 'album']:
search_result['isExplicit'] = nav(data, BADGE_LABEL, True) == 'Explicit'
search_result['thumbnails'] = nav(data, THUMBNAILS)
search_results.append(search_result)