fix: don't show playlists in related videos feed
items in related feed are now checked by contentType to determine if they are videos or not
This commit is contained in:
@@ -212,8 +212,7 @@ def videos(data):
|
||||
y = safeTraverse(entry, ['lockupViewModel'])
|
||||
if not isinstance(y, dict):
|
||||
continue
|
||||
is_mix_or_playlist = safeTraverse(entry, ["lockupViewModel", "contentImage", "collectionThumbnailViewModel", "primaryThumbnail", "thumbnailViewModel", "overlays", 0, "thumbnailOverlayBadgeViewModel", "thumbnailBadges", 0, "thumbnailBadgeViewModel", "icon", "sources", 0, "clientResource", "imageName"], default="") in ("MIX", "PLAYLISTS")
|
||||
if is_mix_or_playlist:
|
||||
if safeTraverse(y, ["contentType"], default="LOCKUP_CONTENT_TYPE_VIDEO") != "LOCKUP_CONTENT_TYPE_VIDEO":
|
||||
# neither mixes nor playlists are currently supported by the invidious api
|
||||
continue
|
||||
# note: this model is similar, but not identical to the one in ythdd_struct_parser. perhaps they can be both handled in the struct parser some time.
|
||||
|
||||
Reference in New Issue
Block a user