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.
query_params = HTTP::Params.new
{"sqp", "rs"}.each do |name|
query_params[name] = env.params.query[name] if env.params.query[name]?
{"sqp", "rs"}.each do |attest_param|
query_params[attest_param] = env.params.query[attest_param] if env.params.query[attest_param]?
end
headers = HTTP::Headers.new

View File

@ -57,7 +57,7 @@ module Invidious::Videos
# Converts the sequence of chapters to a WebVTT representation
def to_vtt
vtt = WebVTT.build do |build|
return WebVTT.build do |build|
self.each do |chapter|
build.cue(chapter.start_ms, chapter.end_ms, chapter.title)
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 related.empty?
# Container for "endScreenVideoRenderer" items
end_screen_watch_next_array = player_overlays.try &.dig?(
"endScreen", "watchNextEndScreenRenderer", "results"
)
player_overlays.try &.as_a.each do |element|
if item = element["endScreenVideoRenderer"]?
related_video = parse_related_video(item)