Skip to content

Commit

Permalink
Fixes "Invalid token. Use get_token for a new one!"
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandog committed Mar 2, 2016
1 parent 4d6d66c commit 527b088
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sickbeard/providers/rarbg.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ def search(self, search_strings, age=0, ep_obj=None): # pylint: disable=too-man
logger.DEBUG)

time.sleep(cpu_presets[sickbeard.CPU_PRESET])

# Check if token is still valid before search
if not self.login():
continue

data = self.get_url(self.urls["api"], params=search_params, returns="json")
if not isinstance(data, dict):
logger.log("No data returned from provider", logger.DEBUG)
Expand Down

0 comments on commit 527b088

Please sign in to comment.