Fix Ameba warnings

This commit is contained in:
syeopite 2024-11-08 16:38:03 -08:00
parent d6573c95d8
commit 1432827bf4
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A
3 changed files with 3 additions and 7 deletions

View File

@ -108,8 +108,8 @@ module Invidious::Routes::Images
# Some thumbnails such as the ones for chapters requires some additional queries. # Some thumbnails such as the ones for chapters requires some additional queries.
query_params = HTTP::Params.new query_params = HTTP::Params.new
{"sqp", "rs"}.each do |name| {"sqp", "rs"}.each do |attest_param|
query_params[name] = env.params.query[name] if env.params.query[name]? query_params[attest_param] = env.params.query[attest_param] if env.params.query[attest_param]?
end end
headers = HTTP::Headers.new headers = HTTP::Headers.new

View File

@ -57,7 +57,7 @@ module Invidious::Videos
# Converts the sequence of chapters to a WebVTT representation # Converts the sequence of chapters to a WebVTT representation
def to_vtt def to_vtt
vtt = WebVTT.build do |build| return WebVTT.build do |build|
self.each do |chapter| self.each do |chapter|
build.cue(chapter.start_ms, chapter.end_ms, chapter.title) build.cue(chapter.start_ms, chapter.end_ms, chapter.title)
end end

View File

@ -275,10 +275,6 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
# If nothing was found previously, fall back to end screen renderer # If nothing was found previously, fall back to end screen renderer
if related.empty? if related.empty?
# Container for "endScreenVideoRenderer" items # Container for "endScreenVideoRenderer" items
end_screen_watch_next_array = player_overlays.try &.dig?(
"endScreen", "watchNextEndScreenRenderer", "results"
)
player_overlays.try &.as_a.each do |element| player_overlays.try &.as_a.each do |element|
if item = element["endScreenVideoRenderer"]? if item = element["endScreenVideoRenderer"]?
related_video = parse_related_video(item) related_video = parse_related_video(item)