mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Add note for livestreams that haven't started
This commit is contained in:
parent
1611ee83a6
commit
55f8fd0b58
3 changed files with 19 additions and 2 deletions
|
@ -228,6 +228,8 @@ VIDEO_FORMATS = {
|
|||
}
|
||||
|
||||
class Video
|
||||
property player_json : JSON::Any?
|
||||
|
||||
module HTTPParamConverter
|
||||
def self.from_rs(rs)
|
||||
HTTP::Params.parse(rs.read(String))
|
||||
|
@ -287,9 +289,15 @@ class Video
|
|||
return audio_streams
|
||||
end
|
||||
|
||||
def captions
|
||||
player_response = JSON.parse(self.info["player_response"])
|
||||
def player_response
|
||||
if !@player_json
|
||||
@player_json = JSON.parse(@info["player_response"])
|
||||
end
|
||||
|
||||
return @player_json.not_nil!
|
||||
end
|
||||
|
||||
def captions
|
||||
captions = [] of Caption
|
||||
if player_response["captions"]?
|
||||
caption_list = player_response["captions"]["playerCaptionsTracklistRenderer"]["captionTracks"]?.try &.as_a
|
||||
|
|
|
@ -196,6 +196,9 @@ get_youtube_comments();
|
|||
</a>
|
||||
<% end %>
|
||||
</h1>
|
||||
<% if !reason.empty? %>
|
||||
<h3><%= reason %></h3>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="pure-g">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue