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:
2025-11-07 18:45:11 +01:00
parent 4421e68d9d
commit 11c94c757e

View File

@@ -212,8 +212,7 @@ def videos(data):
y = safeTraverse(entry, ['lockupViewModel']) y = safeTraverse(entry, ['lockupViewModel'])
if not isinstance(y, dict): if not isinstance(y, dict):
continue 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 safeTraverse(y, ["contentType"], default="LOCKUP_CONTENT_TYPE_VIDEO") != "LOCKUP_CONTENT_TYPE_VIDEO":
if is_mix_or_playlist:
# neither mixes nor playlists are currently supported by the invidious api # neither mixes nor playlists are currently supported by the invidious api
continue 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. # 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.