mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-02 19:50:55 +05:30
Organize the code better
Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
This commit is contained in:
parent
7388e4ca72
commit
50da6cf3e7
@ -237,9 +237,9 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
|
||||
.dig?("secondaryResults", "secondaryResults", "results")
|
||||
secondary_results.try &.as_a.each do |element|
|
||||
if item = element["compactVideoRenderer"]?
|
||||
if item["publishedTimeText"]?
|
||||
rv_published_time_text = item["publishedTimeText"].to_s
|
||||
rv_decoded_time = decode_date(item["publishedTimeText"].to_s)
|
||||
if rv_published_time_text = item["publishedTimeText"]?
|
||||
rv_published_time_text = rv_published_time_text.as_s
|
||||
rv_decoded_time = decode_date(rv_published_time_text)
|
||||
rv_published_timestamp = rv_decoded_time.to_unix.to_s
|
||||
else
|
||||
rv_published_timestamp = nil
|
||||
|
Loading…
Reference in New Issue
Block a user