From bd843e19fa75cb4f5ee8d360432d3e455f78bed0 Mon Sep 17 00:00:00 2001 From: miigotu <miigotu@gmail.com> Date: Mon, 7 Dec 2015 17:19:47 -0800 Subject: [PATCH] Define last_update if it isnt in db already too Fixes https://github.com/SickRage/sickrage-issues/issues/173 --- sickbeard/showUpdater.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sickbeard/showUpdater.py b/sickbeard/showUpdater.py index f8661ecd2..b1bac12f5 100644 --- a/sickbeard/showUpdater.py +++ b/sickbeard/showUpdater.py @@ -55,7 +55,8 @@ class ShowUpdater: if result: last_update = int(result[0]['time']) else: - my_db.action("INSERT INTO lastUpdate (provider,`time`) VALUES (?, ?)", ['theTVDB', update_timestamp - 86400]) + last_update = update_timestamp - 86400 + my_db.action("INSERT INTO lastUpdate (provider,`time`) VALUES (?, ?)", ['theTVDB', last_update]) # refresh network timezones network_timezones.update_network_dict() -- GitLab