mirror of
https://github.com/iv-org/invidious.git
synced 2026-11-12 02:53:22 +05:30
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5aa47e902c |
No files matched your search
@@ -66,7 +66,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Install Crystal
|
||||
uses: crystal-lang/install-crystal@v1.9.4
|
||||
uses: crystal-lang/install-crystal@v1.9.5
|
||||
with:
|
||||
crystal: ${{ matrix.crystal }}
|
||||
|
||||
@@ -138,7 +138,7 @@ jobs:
|
||||
|
||||
- name: Install Crystal
|
||||
id: lint_step_install_crystal
|
||||
uses: crystal-lang/install-crystal@v1.9.4
|
||||
uses: crystal-lang/install-crystal@v1.9.5
|
||||
with:
|
||||
crystal: 1.22.2
|
||||
|
||||
|
||||
@@ -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