mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-11-03 22:21:55 +00:00 
			
		
		
		
	Merge pull request #1808 from tenpura-shrimp/showstreamstart
show how long ago stream started
This commit is contained in:
		@@ -534,7 +534,8 @@ struct Video
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def live_now
 | 
			
		||||
    info["videoDetails"]["isLiveContent"]?.try &.as_bool || false
 | 
			
		||||
    info["microformat"]?.try &.["playerMicroformatRenderer"]?
 | 
			
		||||
      .try &.["liveBroadcastDetails"]?.try &.["isLiveNow"]?.try &.as_bool || false
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def is_listed
 | 
			
		||||
 
 | 
			
		||||
@@ -81,6 +81,10 @@
 | 
			
		||||
        <h3>
 | 
			
		||||
            <%= video.premiere_timestamp.try { |t| translate(locale, "Premieres in `x`", recode_date((t - Time.utc).ago, locale)) } %>
 | 
			
		||||
        </h3>
 | 
			
		||||
    <% elsif video.live_now %>
 | 
			
		||||
        <h3>
 | 
			
		||||
            <%= video.premiere_timestamp.try { |t| translate(locale, "Started streaming `x` ago", recode_date((Time.utc - t).ago, locale)) } %>
 | 
			
		||||
        </h3>
 | 
			
		||||
    <% end %>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user