Skip to content

Commit

Permalink
Fix refreshing bug where things were being cached forever without upd…
Browse files Browse the repository at this point in the history
…ating
  • Loading branch information
SumnerH committed Mar 24, 2015
1 parent c6b68b7 commit 7bdd570
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions library.py
Expand Up @@ -47,11 +47,12 @@ def __init__(self):

def _get_data(self, query_type, useCache):
# Check if data is being refreshed elsewhere
for count in range(31):
data = self.WINDOW.getProperty(query_type+"-data")
if data != "LOADING":
return data if (data or count) else None
xbmc.sleep(100)
if self.WINDOW.getProperty(query_type+"-data") == "LOADING":
for count in range(30):
xbmc.sleep(100)
data = self.WINDOW.getProperty(query_type+"-data")
if data != "LOADING":
return data

if useCache:
# Check whether there is saved data
Expand Down

0 comments on commit 7bdd570

Please sign in to comment.