return videoType on playlist items

This commit is contained in:
Lucas Macedo 2022-10-18 15:07:35 -03:00 • committed by sigma67
commit 4221cb9c1e
2 changed files with 5 additions and 1 deletions

View file

@ -88,6 +88,7 @@ class PlaylistsMixin:
"thumbnails": [...],
"isAvailable": True,
"isExplicit": False,
"videoType": "MUSIC_VIDEO_TYPE_OMV",
"feedbackTokens": {
"add": "AB9zfpJxtvrU...",
"remove": "AB9zfpKTyZ..."

View file

@ -66,6 +66,8 @@ def parse_playlist_items(results, menu_entries: List[List] = None):
isExplicit = nav(data, BADGE_LABEL, True) is not None
videoType = nav(data, MENU_ITEMS + [0, 'menuNavigationItemRenderer', 'navigationEndpoint'] + NAVIGATION_VIDEO_TYPE, True)
song = {
'videoId': videoId,
'title': title,
@ -74,7 +76,8 @@ def parse_playlist_items(results, menu_entries: List[List] = None):
'likeStatus': like,
'thumbnails': thumbnails,
'isAvailable': isAvailable,
'isExplicit': isExplicit
'isExplicit': isExplicit,
'videoType': videoType
}
if duration:
song['duration'] = duration