Don't update platforms at the module level (awful idea)

This commit is contained in:
Mathieu Comandon 2017-04-09 16:36:05 -07:00
parent 8a6ce16f28
commit d368945f0f
2 changed files with 8 additions and 6 deletions

View file

@ -27,7 +27,8 @@ gi.require_version('Gtk', '3.0')
from gi.repository import Gio, GLib, Gtk
from lutris import pga
from lutris.config import check_config # , register_handler
from lutris.config import check_config
from lutris.platforms import update_platforms
from lutris.game import Game
from lutris.gui.installgamedialog import InstallerDialog
from lutris.gui.dialogs import ErrorDialog
@ -44,8 +45,13 @@ from .lutriswindow import LutrisWindow
class Application(Gtk.Application):
def __init__(self):
Gtk.Application.__init__(self, application_id='net.lutris.Lutris',
flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE)
check_config()
migrate()
update_platforms()
GLib.set_application_name(_('Lutris'))
self.window = None
self.css_provider = Gtk.CssProvider.new()
@ -189,9 +195,6 @@ class Application(Gtk.Application):
self.execute_command(command)
return 0
check_config(force_wipe=False)
migrate()
game_slug = ''
uri = options.lookup_value(GLib.OPTION_REMAINING)
if uri:

View file

@ -16,7 +16,7 @@ def _init_platforms():
__all__[platform].append(runner_name)
def _update_platforms():
def update_platforms():
pga_games = pga.get_games(filter_installed=True)
for pga_game in pga_games:
if pga_game.get('platform') or not pga_game['runner']:
@ -27,4 +27,3 @@ def _update_platforms():
_init_platforms()
_update_platforms()