mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-23 05:33:07 +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.
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user