summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-03-29 19:21:44 -0500
committerOmar Roth <omarroth@hotmail.com>2018-03-29 19:21:44 -0500
commit4a7fc4ea697b238098145cad20b21dee7c04bbd3 (patch)
treea2150fb0745a0b0e9474455aecdaa6ade7f117b6
parent60360ee2ae7c22284ad1c01cbae33dbb77734ec2 (diff)
downloadinvidious-4a7fc4ea697b238098145cad20b21dee7c04bbd3.tar.gz
invidious-4a7fc4ea697b238098145cad20b21dee7c04bbd3.tar.bz2
invidious-4a7fc4ea697b238098145cad20b21dee7c04bbd3.zip
Fix refresh time
-rw-r--r--src/helpers.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helpers.cr b/src/helpers.cr
index fca6bb90..33035d60 100644
--- a/src/helpers.cr
+++ b/src/helpers.cr
@@ -207,7 +207,7 @@ def get_video(id, client, db, refresh = true)
video = db.query_one("SELECT * FROM videos WHERE id = $1", id, as: Video)
# If record was last updated over an hour ago, refresh (expire param in response lasts for 6 hours)
- if refresh && Time.now - video.updated > 1.second
+ if refresh && Time.now - video.updated > 1.hour
begin
video = fetch_video(id, client)
video_array = video.to_a