Beispiel #1
0
 def remove(self, from_library=False, from_disk=False):
     if from_disk:
         self.runner.remove_game_data(game_path=self.directory)
     if from_library:
         pga.delete_game(self.slug)
         self.config.remove()
     else:
         pga.set_uninstalled(self.slug)
     shortcuts.remove_launcher(self.slug, desktop=True, menu=True)
Beispiel #2
0
 def remove(self, from_library=False, from_disk=False):
     if from_disk:
         logger.debug("Removing game %s from disk" % self.id)
         self.runner.remove_game_data(game_path=self.directory)
     if from_library:
         logger.debug("Removing game %s from library" % self.id)
         pga.delete_game(self.id)
     else:
         pga.set_uninstalled(self.id)
     self.config.remove()
     shortcuts.remove_launcher(self.slug, self.id, desktop=True, menu=True)
Beispiel #3
0
    def remove(self, from_library=False, from_disk=False):
        if from_disk and self.runner:
            logger.debug("Removing game %s from disk" % self.id)
            self.runner.remove_game_data(game_path=self.directory)

        # Do not keep multiple copies of the same game
        existing_games = pga.get_game_by_field(self.slug, 'slug', all=True)
        if len(existing_games) > 1:
            from_library = True

        if from_library:
            logger.debug("Removing game %s from library" % self.id)
            pga.delete_game(self.id)
        else:
            pga.set_uninstalled(self.id)
        self.config.remove()
        shortcuts.remove_launcher(self.slug, self.id, desktop=True, menu=True)
        return from_library
Beispiel #4
0
    def remove(self, from_library=False, from_disk=False):
        if from_disk and self.runner:
            logger.debug("Removing game %s from disk" % self.id)
            self.runner.remove_game_data(game_path=self.directory)

        # Do not keep multiple copies of the same game
        existing_games = pga.get_game_by_field(self.slug, 'slug', all=True)
        if len(existing_games) > 1:
            from_library = True

        if from_library:
            logger.debug("Removing game %s from library" % self.id)
            pga.delete_game(self.id)
        else:
            pga.set_uninstalled(self.id)
        self.config.remove()
        shortcuts.remove_launcher(self.slug, self.id, desktop=True, menu=True)
        return from_library
Beispiel #5
0
 def remove_desktop_shortcut(self, *args):
     game = Game(self.view.selected_game)
     shortcuts.remove_launcher(game.slug, game.id, desktop=True)
Beispiel #6
0
 def remove_menu_shortcut(self, *args):
     game = Game(self.view.selected_game)
     shortcuts.remove_launcher(game.slug, game.id, menu=True)
Beispiel #7
0
 def remove_desktop_shortcut(self, *args):
     game = Game(self.view.selected_game)
     shortcuts.remove_launcher(game.slug, game.id, desktop=True)
Beispiel #8
0
 def remove_menu_shortcut(self, *args):
     game = Game(self.view.selected_game)
     shortcuts.remove_launcher(game.slug, game.id, menu=True)
Beispiel #9
0
 def remove_desktop_shortcut(self, *args):
     game_slug = slugify(self.view.selected_game)
     shortcuts.remove_launcher(game_slug, desktop=True)
Beispiel #10
0
 def remove_menu_shortcut(self, *args):
     game_slug = slugify(self.view.selected_game)
     shortcuts.remove_launcher(game_slug, menu=True)