-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Playlists cataloged as a Mix (which are playlists generated by Youtube) have a video count of -1 video. It should display Mix
instead of the quantity of videos the playlist has.

Lines that need to be fixed:
invidious/src/invidious/yt_backend/extractors.cr
Lines 673 to 679 in 89c8b1b
video_count = thumbnail_view_model.dig("overlays").as_a | |
.compact_map(&.dig?("thumbnailOverlayBadgeViewModel", "thumbnailBadges").try &.as_a) | |
.flatten | |
.find(nil, &.dig?("thumbnailBadgeViewModel", "text").try { |node| | |
{"episodes", "videos"}.any? { |str| node.as_s.ends_with?(str) } | |
}) | |
.try &.dig("thumbnailBadgeViewModel", "text").as_s.to_i(strict: false) |
JSON looks like this:
"thumbnailOverlayBadgeViewModel": {
"thumbnailBadges": [
{
"thumbnailBadgeViewModel": {
"icon": {
"sources": [
{
"clientResource": {
"imageName": "MIX"
}
}
]
},
"text": "Mix", # THIS LINE NEEDS TO BE CONSIDERED
"badgeStyle": "THUMBNAIL_OVERLAY_BADGE_STYLE_DEFAULT"
}
}
],
"position": "THUMBNAIL_OVERLAY_BADGE_POSITION_BOTTOM_END"
}
FavoritoHJS
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working