From 5041bbe2378ce3e693de0d14f7632cf9224d073d Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 16 Oct 2025 18:03:03 -0300 Subject: [PATCH] Remove view_count variable since it's unused by Innertube --- src/invidious/videos/parser.cr | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr index 5335aa79..cd97f0d9 100644 --- a/src/invidious/videos/parser.cr +++ b/src/invidious/videos/parser.cr @@ -25,11 +25,6 @@ def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)? ucid = channel_info.try { |ci| HelperExtractors.get_browse_id(ci) } - # "4,088,033 views", only available on compact renderer - # and when video is not a livestream - view_count = related.dig?("viewCountText", "simpleText") - .try &.as_s.gsub(/\D/, "") - short_view_count = related.try do |r| HelperExtractors.get_short_view_count(r).to_s end @@ -51,7 +46,6 @@ def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)? "author" => author || JSON::Any.new(""), "ucid" => JSON::Any.new(ucid || ""), "length_seconds" => JSON::Any.new(length || "0"), - "view_count" => JSON::Any.new(view_count || "0"), "short_view_count" => JSON::Any.new(short_view_count || "0"), "author_verified" => JSON::Any.new(author_verified), "published" => JSON::Any.new(published || ""),