Add like information to get_artist, get_history, get_library_songs, get_playlist
This commit is contained in:
parent
7f3e1436d9
commit
400342bc9c
2 changed files with 7 additions and 2 deletions
|
|
@ -133,7 +133,11 @@ def parse_playlist_items(results):
|
|||
duration = data['fixedColumns'][0][
|
||||
'musicResponsiveListItemFixedColumnRenderer']['text']['runs'][0]['text']
|
||||
|
||||
song = {'videoId': videoId, 'title': title, 'artists': artists, 'album': album}
|
||||
like = None
|
||||
if 'menu' in data:
|
||||
like = data['menu']['menuRenderer']['topLevelButtons'][0]['likeButtonRenderer']['likeStatus']
|
||||
|
||||
song = {'videoId': videoId, 'title': title, 'artists': artists, 'album': album, 'likeStatus': like}
|
||||
if duration:
|
||||
song['duration'] = duration
|
||||
if setVideoId:
|
||||
|
|
|
|||
|
|
@ -706,7 +706,8 @@ class YTMusic:
|
|||
"name": "Lost",
|
||||
"id": "MPREb_PxmzvDuqOnC"
|
||||
},
|
||||
"duration": "2:58"
|
||||
"duration": "2:58",
|
||||
"likeStatus": "INDIFFERENT"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue