mirror of
https://github.com/iv-org/invidious.git
synced 2026-11-12 02:53:22 +05:30
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e61cb43eff |
No files matched your search
Generated
+3
-3
@@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1792773339,
|
||||
"narHash": "sha256-rZLrzrC6i+jnTAlvPZHogKDulY7WWDEv9hJeHieO7Zw=",
|
||||
"lastModified": 1793540411,
|
||||
"narHash": "sha256-fiPJ88izTVucjeo2EQ3jk4aWmLg03I1D4vxnX2QjEgE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3ec636362e1816bc2f0888fa0fa2c69f1bc9e504",
|
||||
"rev": "0bb2eedc20e4739f29e8045034f2828ad7054f8f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -715,13 +715,6 @@ private module Parsers
|
||||
# Contains the views of the video and the published time of the video.
|
||||
if (metadata_rows = metadata.dig("metadata", "contentMetadataViewModel", "metadataRows").try &.as_a)
|
||||
metadata_rows.each do |row|
|
||||
# To filter members only videos, they do not have metadataParts available.
|
||||
# This videos are not hidden from the channel videos list.
|
||||
badges = row.dig?("badges").try &.as_a
|
||||
if badges.try &.any? { |item| item.dig?("badgeViewModel", "badgeStyle").try &.as_s == "BADGE_MEMBERS_ONLY" }
|
||||
next
|
||||
end
|
||||
|
||||
metadata_parts = row.dig("metadataParts").try &.as_a
|
||||
|
||||
if view_count_text.nil?
|
||||
@@ -808,13 +801,7 @@ private module Parsers
|
||||
.compact_map(&.dig?("thumbnailOverlayBadgeViewModel", "thumbnailBadges").try &.as_a)
|
||||
.flatten
|
||||
.find(nil, &.dig?("thumbnailBadgeViewModel", "text").try do |node|
|
||||
# Playlists that contain MORE THAN ONE video, use "videos" for their video count.
|
||||
# "text" => "8 videos"
|
||||
#
|
||||
# Playlists that contain ONLY ONE video, use "video" for their video count.
|
||||
# "text" => "1 video"
|
||||
#
|
||||
{"episodes", "videos", "video", "lessons"}.any? { |str| node.as_s.ends_with?(str) }
|
||||
{"episodes", "videos", "lessons"}.any? { |str| node.as_s.ends_with?(str) }
|
||||
end)
|
||||
.try &.dig("thumbnailBadgeViewModel", "text").as_s.to_i(strict: false)
|
||||
|
||||
|
||||
Reference in new issue
Block a user