Пример #1
0
 def update_user_images(self, user_id, roms):
     """
     Sets a suitable grid image for every rom in 'roms' for the user defined
     by 'user_id'
     """
     grid = steam_grid.SteamGrid(
         steam_user_manager.userdata_directory_for_user_id(user_id))
     for rom in roms:
         shortcut = rom.to_shortcut()
         if not grid.existing_image_for_filename(
                 grid.filename_for_shortcut(shortcut.appname,
                                            shortcut.exe)):
             image = self.find_image_for_rom(rom)
             # Game not found
             if image is None:
                 log_file("No game found for %s on %s" %
                          (rom.name(), rom.console.fullname))
                 log_user(
                     "The image provider has no game called %s for %s. Try going to the provider and submittng the game yourself"
                     % (rom.name(), rom.console.fullname))
             # Game found, but there is no picture
             elif image == "":
                 log_file(
                     "No image found for %s. The URL checked was '%s'" %
                     (rom.name(), self.url_for_rom(rom)))
                 log_user(
                     "We couldn't find an image for %s. If you find one you like, upload it to %s, and next time Ice runs it will use it"
                     % (rom.name(), self.host_for_image_source()))
             # Game found, AND there is a picture there
             else:
                 log_file("Setting custom image for %s" % rom.name())
                 image_path = self.download_image(image)
                 grid.set_image_for_shortcut(image_path, shortcut.appname,
                                             shortcut.exe)
Пример #2
0
 def update_user_images(self, user_id, roms):
     """
     Sets a suitable grid image for every rom in 'roms' for the user
     defined by 'user_id'
     """
     grid = steam_grid.SteamGrid(steam_user_manager.userdata_directory_for_user_id(user_id))
     for rom in roms:
         shortcut = rom.to_shortcut()
         if not grid.existing_image_for_filename(grid.filename_for_shortcut(shortcut.appname, shortcut.exe)):
             path = self.image_for_rom(rom)
             if path is None:
                 # TODO: Tell the user what went wrong
                 pass
             else:
                 # TODO: Tell the user that an image was found
                 ice_logger.log("Found grid image for %s" % shortcut.appname)
                 grid.set_image_for_shortcut(path, shortcut.appname, shortcut.exe)
Пример #3
0
 def update_user_images(self, user_id, roms):
     """
     Sets a suitable grid image for every rom in 'roms' for the user
     defined by 'user_id'
     """
     grid = steam_grid.SteamGrid(
         steam_user_manager.userdata_directory_for_user_id(user_id))
     for rom in roms:
         shortcut = rom.to_shortcut()
         if not grid.existing_image_for_filename(
                 grid.filename_for_shortcut(shortcut.appname,
                                            shortcut.exe)):
             path = self.image_for_rom(rom)
             if path is None:
                 # TODO: Tell the user what went wrong
                 pass
             else:
                 # TODO: Tell the user that an image was found
                 ice_logger.log("Found grid image for %s" %
                                shortcut.appname)
                 grid.set_image_for_shortcut(path, shortcut.appname,
                                             shortcut.exe)
Пример #4
0
 def update_user_images(self,user_id,roms):
     """
     Sets a suitable grid image for every rom in 'roms' for the user defined
     by 'user_id'
     """
     grid = steam_grid.SteamGrid(steam_user_manager.userdata_directory_for_user_id(user_id))
     for rom in roms:
         shortcut = rom.to_shortcut()
         if not grid.existing_image_for_filename(grid.filename_for_shortcut(shortcut.appname,shortcut.exe)):
             image = self.find_image_for_rom(rom)
             # Game not found
             if image is None:
                 log_file("No game found for %s on %s" % (rom.name(),rom.console.fullname))
                 log_user("The image provider has no game called %s for %s. Try going to %s and submittng the game yourself" % (rom.name(),rom.console.fullname, self.host_for_image_source()))
             # Game found, but there is no picture
             elif image == "":
                 log_file("No image found for %s. The URL checked was '%s'" % (rom.name(),self.url_for_rom(rom)))
                 log_user("We couldn't find an image for %s. If you find one you like, upload it to %s, and next time Ice runs it will use it" % (rom.name(),self.host_for_image_source()))
             # Game found, AND there is a picture there
             else:
                 log_file("Setting custom image for %s" % rom.name())
                 image_path = self.download_image(image)
                 grid.set_image_for_shortcut(image_path,shortcut.appname,shortcut.exe)
Пример #5
0
 def update_artwork(self, user_id, roms):
     grid = SteamGrid(
         steam_user_manager.userdata_directory_for_user_id(user_id))
     for rom in roms:
         pass
Пример #6
0
 def update_artwork(self,user_id,roms):
     grid = SteamGrid(steam_user_manager.userdata_directory_for_user_id(user_id))
     for rom in roms:
         pass