validate playlist ids in playlist methods

additionally small code quality improvements
This commit is contained in:
sigma67 2021-05-14 19:45:41 +02:00
commit 5ae470e260
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
6 changed files with 29 additions and 26 deletions

View file

@ -1,4 +1,5 @@
# commonly used navigation paths
RUN_TEXT = ['runs', 0, 'text']
TAB_CONTENT = ['tabs', 0, 'tabRenderer', 'content']
SINGLE_COLUMN_TAB = ['contents', 'singleColumnBrowseResultsRenderer'] + TAB_CONTENT
SECTION_LIST = ['sectionListRenderer', 'contents']
@ -20,12 +21,13 @@ NAVIGATION_VIDEO_ID = ['navigationEndpoint', 'watchEndpoint', 'videoId']
NAVIGATION_PLAYLIST_ID = ['navigationEndpoint', 'watchEndpoint', 'playlistId']
NAVIGATION_WATCH_PLAYLIST_ID = ['navigationEndpoint', 'watchPlaylistEndpoint', 'playlistId']
HEADER_DETAIL = ['header', 'musicDetailHeaderRenderer']
DESCRIPTION = ['description'] + RUN_TEXT
CAROUSEL_TITLE = ['header', 'musicCarouselShelfBasicHeaderRenderer', 'title', 'runs', 0]
FRAMEWORK_MUTATIONS = ['frameworkUpdates', 'entityBatchUpdate', 'mutations']
TITLE = ['title', 'runs', 0]
TITLE_TEXT = ['title', 'runs', 0, 'text']
TITLE_TEXT = ['title'] + RUN_TEXT
TEXT_RUN = ['text', 'runs', 0]
SUBTITLE = ['subtitle', 'runs', 0, 'text']
SUBTITLE = ['subtitle'] + RUN_TEXT
SUBTITLE2 = ['subtitle', 'runs', 2, 'text']
SUBTITLE3 = ['subtitle', 'runs', 4, 'text']
THUMBNAIL = ['thumbnail', 'thumbnails']