fix isExplicit label for localized instances
This commit is contained in:
parent
3043116d69
commit
221cce92ae
3 changed files with 3 additions and 3 deletions
|
|
@ -115,7 +115,7 @@ class Parser:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if resultType in ['song', 'album']:
|
if resultType in ['song', 'album']:
|
||||||
search_result['isExplicit'] = nav(data, BADGE_LABEL, True) == 'Explicit'
|
search_result['isExplicit'] = nav(data, BADGE_LABEL, True) is not None
|
||||||
|
|
||||||
search_result['thumbnails'] = nav(data, THUMBNAILS, True)
|
search_result['thumbnails'] = nav(data, THUMBNAILS, True)
|
||||||
search_results.append(search_result)
|
search_results.append(search_result)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ def parse_chart_song(data):
|
||||||
'videoId': nav(flex_0, TEXT_RUN + NAVIGATION_VIDEO_ID, True),
|
'videoId': nav(flex_0, TEXT_RUN + NAVIGATION_VIDEO_ID, True),
|
||||||
'artists': parse_song_artists(data, 1),
|
'artists': parse_song_artists(data, 1),
|
||||||
'thumbnails': nav(data, THUMBNAILS),
|
'thumbnails': nav(data, THUMBNAILS),
|
||||||
'isExplicit': nav(data, BADGE_LABEL, True) == 'Explicit'
|
'isExplicit': nav(data, BADGE_LABEL, True) is not None
|
||||||
}
|
}
|
||||||
flex_2 = get_flex_column_item(data, 2)
|
flex_2 = get_flex_column_item(data, 2)
|
||||||
if flex_2 and 'navigationEndpoint' in nav(flex_2, TEXT_RUN):
|
if flex_2 and 'navigationEndpoint' in nav(flex_2, TEXT_RUN):
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ def parse_playlist_items(results, menu_entries: List[List] = None):
|
||||||
isAvailable = data[
|
isAvailable = data[
|
||||||
'musicItemRendererDisplayPolicy'] != 'MUSIC_ITEM_RENDERER_DISPLAY_POLICY_GREY_OUT'
|
'musicItemRendererDisplayPolicy'] != 'MUSIC_ITEM_RENDERER_DISPLAY_POLICY_GREY_OUT'
|
||||||
|
|
||||||
isExplicit = nav(data, BADGE_LABEL, True) == 'Explicit'
|
isExplicit = nav(data, BADGE_LABEL, True) is not None
|
||||||
|
|
||||||
song = {
|
song = {
|
||||||
'videoId': videoId,
|
'videoId': videoId,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue