mirror of
https://github.com/iv-org/invidious.git
synced 2026-07-07 14:16:45 -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.
|
# Fetch the /next endpoint for additional data.
|
||||||
begin
|
begin
|
||||||
next_response = YoutubeAPI.next({"videoId": video_id, "params": ""})
|
next_response = YoutubeAPI.next({"videoId": video_id, "params": ""})
|
||||||
# Remove the microformat returned by the /next endpoint on some videos
|
# Remove the microformat returned by the /next endpoint on some videos
|
||||||
# to prevent player_response microformat from being overwritten.
|
# to prevent player_response microformat from being overwritten.
|
||||||
next_response.delete("microformat")
|
next_response.delete("microformat")
|
||||||
player_response = player_response.merge(next_response)
|
player_response = player_response.merge(next_response)
|
||||||
rescue ex
|
rescue ex
|
||||||
# If we're in an error state and /next fails, return what we have
|
# If we're in an error state and /next fails, return what we have
|
||||||
if reason
|
if reason
|
||||||
LOGGER.debug("extract_video_info: /next failed for #{video_id}: #{ex.message}")
|
LOGGER.debug("extract_video_info: /next failed for #{video_id}: #{ex.message}")
|
||||||
return {
|
return {
|
||||||
"version" => JSON::Any.new(Video::SCHEMA_VERSION.to_i64),
|
"version" => JSON::Any.new(Video::SCHEMA_VERSION.to_i64),
|
||||||
"reason" => JSON::Any.new(reason),
|
"reason" => JSON::Any.new(reason),
|
||||||
"subreason" => JSON::Any.new(subreason),
|
"subreason" => JSON::Any.new(subreason),
|
||||||
}
|
}
|
||||||
end
|
|
||||||
raise ex
|
|
||||||
end
|
end
|
||||||
|
raise ex
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
params = self.parse_video_info(video_id, player_response)
|
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" %>
|
<%= rendered "components/player" %>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% 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">
|
<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">
|
<p style="color:#fff;font-size:1.2em;text-align:center">
|
||||||
<%= I18n.translate(locale, "error_from_youtube_unplayable") %><br/>
|
<%= I18n.translate(locale, "error_from_youtube_unplayable") %><br/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user