mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-27 01:01:59 +05:30
Fix Ameba warnings
This commit is contained in:
parent
d6573c95d8
commit
1432827bf4
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user