Skip to content

Commit

Permalink
Used ratoaq2 advice, and did a small poc on using the minutes. Maybe …
Browse files Browse the repository at this point in the history
…there are cleaner ways in solving this.
  • Loading branch information
p0psicles committed Jun 23, 2016
1 parent 13ad507 commit ed95762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sickbeard/tvcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def setLastSearch(self, toDate=None):

def shouldUpdate(self):
# if we've updated recently then skip the update
if datetime.datetime.today() - self.lastUpdate < datetime.timedelta(minutes=self.minTime, seconds=-10):
if int((datetime.datetime.today() - self.lastUpdate).total_seconds() / 60) <= self.minTime:
logger.log(u'Last update was too soon, using old cache: {0}. Updated less then {1} minutes ago.'.format
(self.lastUpdate, self.minTime), logger.DEBUG)
return False
Expand Down

0 comments on commit ed95762

Please sign in to comment.