mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-30 10:42:53 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -90,7 +90,7 @@ struct SearchVideo
|
||||
json.field "lengthSeconds", self.length_seconds
|
||||
json.field "liveNow", self.live_now
|
||||
json.field "premium", self.premium
|
||||
json.field "isUpcoming", self.is_upcoming
|
||||
json.field "isUpcoming", self.upcoming?
|
||||
|
||||
if self.premiere_timestamp
|
||||
json.field "premiereTimestamp", self.premiere_timestamp.try &.to_unix
|
||||
@@ -109,7 +109,7 @@ struct SearchVideo
|
||||
to_json(nil, json)
|
||||
end
|
||||
|
||||
def is_upcoming
|
||||
def upcoming?
|
||||
premiere_timestamp ? true : false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,10 +10,8 @@ class Invidious::DecryptFunction
|
||||
end
|
||||
|
||||
def check_update
|
||||
now = Time.utc
|
||||
|
||||
# If we have updated in the last 5 minutes, do nothing
|
||||
return if (now - @last_update) > 5.minutes
|
||||
return if (Time.utc - @last_update) < 5.minutes
|
||||
|
||||
# Get the amount of time elapsed since when the player was updated, in the
|
||||
# event where multiple invidious processes are run in parallel.
|
||||
|
||||
Reference in New Issue
Block a user