From fc34ae1c62aa7d23ed72b40f9b9eaa294e85969c Mon Sep 17 00:00:00 2001 From: Gordon Shumway <39967334+oddluck@users.noreply.github.com> Date: Sun, 16 Jun 2019 09:41:13 -0400 Subject: [PATCH] move randomization --- Jeopardy/plugin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Jeopardy/plugin.py b/Jeopardy/plugin.py index 694d191..3954c44 100644 --- a/Jeopardy/plugin.py +++ b/Jeopardy/plugin.py @@ -183,7 +183,7 @@ class Jeopardy(callbacks.Plugin): data.extend(requests.get("http://jservice.io/api/clues?&category={0}&offset=400".format(category)).json()) if cluecount > 500: data.extend(requests.get("http://jservice.io/api/clues?&category={0}&offset=500".format(category)).json()) - if cluecount > 9: + if self.registryValue('randomize', channel): random.shuffle(data) for item in data: if n > self.num or k > len(self.categories): @@ -207,8 +207,6 @@ class Jeopardy(callbacks.Plugin): except Exception: pass del data - if self.registryValue('randomize', channel): - random.shuffle(self.questions) try: schedule.removeEvent('next_%s' % self.channel) except KeyError: