Ejemplo n.º 1
0
 def do_load_games(self, online=True):
     """
     Load game lists from the remote connection to gogonlinux or from the
     locally stored cache, and then call function to load local game list.
     """
     if not online and not os.path.exists(CACHE_PATH): 
         return
     beta = self.have_beta_access == "True"
     if not online:
         self.game_data = site_conn.obtain_available_games(beta, CACHE_PATH)
     else:
         self.game_data = site_conn.obtain_available_games(beta)
         with open(CACHE_PATH, "w") as f:
             f.write(json.dumps(self.game_data))
     self.availgameslist.clear()
     for name, content in self.game_data.items():
         if content["released"] == '0':
             image = self.beta
         else:
             image = self.compat[content["compat"]]
         self.availgameslist.append((content["title"], content["emulation"],
                                     image, name))
     self.refresh_local_list()
Ejemplo n.º 2
0
 def do_load_games(self):
     """ 
     Load game lists from the remote connection to gogonlinux 
     and then call function to load local game list.
     """
     if self.have_beta_access == "True":
         self.game_data = site_conn.obtain_beta_available_games()
     else:
         self.game_data = site_conn.obtain_available_games()
     for name, content in self.game_data.items():
         if content["released"] == '0':
             image = self.beta
         else:
             image = self.compat[content["compat"]]
         self.availgameslist.append((content["title"], content["emulation"],
                                     image, name))
     self.refresh_local_list()