From 312de990f0a3f43e318eb40e8d559fc09af75090 Mon Sep 17 00:00:00 2001 From: girst Date: Fri, 16 Jul 2021 20:50:42 +0200 Subject: [PATCH] implement gridShowRenderer playlist type --- app/common/innertube.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/common/innertube.py b/app/common/innertube.py index 9d0053d..095faa1 100644 --- a/app/common/innertube.py +++ b/app/common/innertube.py @@ -369,6 +369,18 @@ def parse_channel_items(items, channel_id, author): 'channel_id': channel_id, 'n_videos': None, }}) + elif key in ["gridShowRenderer"]: + result.append({'type': 'PLAYLIST', 'content': { + 'playlist_id': (content|G('navigationEndpoint') + |G('browseEndpoint')|G('browseId'))[2:], + #^: playlistId prefixed with 'VL', which must be removed + 'video_id': None, + 'title': content|G('title')|G.text, + 'author': author, + 'channel_id': channel_id, + 'n_videos': content|G('thumbnailOverlays')|G(0) + |G('thumbnailOverlayBottomPanelRenderer')|G('text')|G.text, + }}) elif key in ["itemSectionRenderer", "gridRenderer", "horizontalCardListRenderer"]: newkey = { "itemSectionRenderer": 'contents', -- 2.39.3