mirror of
https://github.com/iv-org/invidious.git
synced 2025-03-23 06:06:34 -04:00
Fixed an issue
This commit is contained in:
parent
b7a252b096
commit
f9460e31bc
@ -236,7 +236,11 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
|
|||||||
.dig?("secondaryResults", "secondaryResults", "results")
|
.dig?("secondaryResults", "secondaryResults", "results")
|
||||||
secondary_results.try &.as_a.each do |element|
|
secondary_results.try &.as_a.each do |element|
|
||||||
if item = element["compactVideoRenderer"]?
|
if item = element["compactVideoRenderer"]?
|
||||||
time_string = item["publishedTimeText"]["simpleText"]?
|
time_text = item["publishedTimeText"]?
|
||||||
|
time_string = nil
|
||||||
|
if !time_text.nil?
|
||||||
|
time_string = time_text["simpleText"]?
|
||||||
|
end
|
||||||
if !time_string.nil? && time_string.to_s.ends_with?("hour ago")
|
if !time_string.nil? && time_string.to_s.ends_with?("hour ago")
|
||||||
time = Time.utc.to_unix - 3600
|
time = Time.utc.to_unix - 3600
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user