Compare commits

...

2 Commits

Author SHA1 Message Date
11c94c757e 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
2025-11-07 18:45:11 +01:00
4421e68d9d fix: format stream itag is now a string (as it should)
fixes playback on clipious
2025-11-07 18:43:07 +01:00
2 changed files with 2 additions and 3 deletions

View File

@@ -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.

View File

@@ -530,7 +530,7 @@ def parseFormatStreams(wdata_fstream: dict, ydata_stream: dict) -> dict:
fstream = {
"url": stream_url,
"itag": wdata_fstream["itag"],
"itag": str(wdata_fstream["itag"]),
"type": wdata_fstream["mimeType"],
"quality": wdata_fstream["quality"],
"bitrate": str(wdata_fstream["bitrate"]),