diff options
| author | RadoslavL <63926126+RadoslavL@users.noreply.github.com> | 2023-11-08 10:13:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-08 10:13:16 +0200 |
| commit | 6236cea33e1393a4708bfd3a0083e05e553bc8ed (patch) | |
| tree | 2b37d3f7b481fb0b1d1858ff1f52954f4c9fdd88 | |
| parent | fa59f41f7bc4df72ea49d6e2e9902a93e0de5228 (diff) | |
| download | invidious-6236cea33e1393a4708bfd3a0083e05e553bc8ed.tar.gz invidious-6236cea33e1393a4708bfd3a0083e05e553bc8ed.tar.bz2 invidious-6236cea33e1393a4708bfd3a0083e05e553bc8ed.zip | |
Changed some variable names
Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
| -rw-r--r-- | src/invidious/videos/parser.cr | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr index 373715fe..52623051 100644 --- a/src/invidious/videos/parser.cr +++ b/src/invidious/videos/parser.cr @@ -236,14 +236,13 @@ 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"]? - time_text = item["publishedTimeText"]? - if !time_text.nil? - time = decode_date(item["publishedTimeText"].to_s) - published1 = JSON::Any.new(time.to_unix.to_s) + if item["publishedTimeText"]? + rv_decoded_time = decode_date(item["publishedTimeText"].to_s) + rv_published_timestamp = JSON::Any.new(rv_decoded_time.to_unix.to_s) else - published1 = JSON::Any.new("") + rv_published_timestamp = JSON::Any.new("") end - related_video = parse_related_video(item, published1) + related_video = parse_related_video(item, rv_published_timestamp) related << JSON::Any.new(related_video) if related_video end end |
