Fix result quality for album search results
This commit is contained in:
parent
0332269949
commit
23f278cd85
1 changed files with 2 additions and 2 deletions
|
|
@ -40,8 +40,6 @@ class Parser:
|
||||||
|
|
||||||
elif resultType == 'album':
|
elif resultType == 'album':
|
||||||
search_result['type'] = get_item_text(data, 1)
|
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, True)
|
|
||||||
|
|
||||||
elif resultType == 'playlist':
|
elif resultType == 'playlist':
|
||||||
search_result['author'] = get_item_text(data, 1, default_offset)
|
search_result['author'] = get_item_text(data, 1, default_offset)
|
||||||
|
|
@ -106,6 +104,8 @@ class Parser:
|
||||||
data, PLAY_BUTTON + ['playNavigationEndpoint', 'watchEndpoint', 'videoId'],
|
data, PLAY_BUTTON + ['playNavigationEndpoint', 'watchEndpoint', 'videoId'],
|
||||||
True)
|
True)
|
||||||
|
|
||||||
|
if resultType in ['song', 'video', 'album']:
|
||||||
|
search_result['year'] = None
|
||||||
song_info = parse_song_runs(get_flex_column_item(data, 1)['text']['runs'])
|
song_info = parse_song_runs(get_flex_column_item(data, 1)['text']['runs'])
|
||||||
search_result.update(song_info)
|
search_result.update(song_info)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue