Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
Add same logic to python3 branch for issue mrworf#182
  • Loading branch information
Tom Anschutz authored Mar 8, 2021
1 parent ba3b6ab commit 66eb329
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def getId(self):

def getImagesTotal(self):
# return the total number of images provided by this service
sum = 0
if self.needKeywords():
for keyword in self.getKeywords():
if keyword not in self._STATE["_NUM_IMAGES"] or keyword not in self._STATE['_NEXT_SCAN'] \
Expand All @@ -190,7 +191,8 @@ def getImagesTotal(self):
logging.debug('Keywords either not scanned or we need to scan now')
self._getImagesFor(keyword) # Will make sure to get images
self._STATE['_NEXT_SCAN'][keyword] = time.time() + self.REFRESH_DELAY
return sum([self._STATE["_NUM_IMAGES"][k] for k in self._STATE["_NUM_IMAGES"]])
sum = sum + self._STATE["_NUM_IMAGES"][keyword]
return sum

def getImagesSeen(self):
count = 0
Expand Down

0 comments on commit 66eb329

Please sign in to comment.