mirror of
https://github.com/iv-org/invidious.git
synced 2026-07-07 06:06:48 -05:00
Fix indentation for crystal format compliance
This commit is contained in:
parent
537c7a86ce
commit
d4a5593ab9
@ -102,23 +102,23 @@ module Invidious::Videos::Parser
|
||||
|
||||
# Fetch the /next endpoint for additional data.
|
||||
begin
|
||||
next_response = YoutubeAPI.next({"videoId": video_id, "params": ""})
|
||||
# Remove the microformat returned by the /next endpoint on some videos
|
||||
# to prevent player_response microformat from being overwritten.
|
||||
next_response.delete("microformat")
|
||||
player_response = player_response.merge(next_response)
|
||||
rescue ex
|
||||
# If we're in an error state and /next fails, return what we have
|
||||
if reason
|
||||
LOGGER.debug("extract_video_info: /next failed for #{video_id}: #{ex.message}")
|
||||
return {
|
||||
"version" => JSON::Any.new(Video::SCHEMA_VERSION.to_i64),
|
||||
"reason" => JSON::Any.new(reason),
|
||||
"subreason" => JSON::Any.new(subreason),
|
||||
}
|
||||
end
|
||||
raise ex
|
||||
next_response = YoutubeAPI.next({"videoId": video_id, "params": ""})
|
||||
# Remove the microformat returned by the /next endpoint on some videos
|
||||
# to prevent player_response microformat from being overwritten.
|
||||
next_response.delete("microformat")
|
||||
player_response = player_response.merge(next_response)
|
||||
rescue ex
|
||||
# If we're in an error state and /next fails, return what we have
|
||||
if reason
|
||||
LOGGER.debug("extract_video_info: /next failed for #{video_id}: #{ex.message}")
|
||||
return {
|
||||
"version" => JSON::Any.new(Video::SCHEMA_VERSION.to_i64),
|
||||
"reason" => JSON::Any.new(reason),
|
||||
"subreason" => JSON::Any.new(subreason),
|
||||
}
|
||||
end
|
||||
raise ex
|
||||
end
|
||||
|
||||
begin
|
||||
params = self.parse_video_info(video_id, player_response)
|
||||
|
||||
@ -76,7 +76,7 @@ we're going to need to do it here in order to allow for translations.
|
||||
<%= rendered "components/player" %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div id="player-container" class="h-box">
|
||||
<div class="h-box">
|
||||
<div style="display:flex;align-items:center;justify-content:center;background-color:#000;width:100%;aspect-ratio:16/9">
|
||||
<p style="color:#fff;font-size:1.2em;text-align:center">
|
||||
<%= I18n.translate(locale, "error_from_youtube_unplayable") %><br/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user