def manual_set_music_artwork(self, details, mediatype): '''manual override artwork options''' from utils import manual_set_artwork if mediatype == "artist" and "artist" in details: header = "%s: %s" % (xbmc.getLocalizedString(13511), details["artist"]) else: header = "%s: %s" % (xbmc.getLocalizedString(13511), xbmc.getLocalizedString(558)) changemade, artwork = manual_set_artwork(details["art"], mediatype, header) # save results if any changes made if changemade: details["art"] = artwork refresh_needed = False download_art = self.metadatautils.addon.getSetting("music_art_download") == "true" download_art_custom = self.metadatautils.addon.getSetting("music_art_download_custom") == "true" # download artwork to music folder if needed if details.get("diskpath") and download_art: details["art"] = download_artwork(details["diskpath"], details["art"]) refresh_needed = True # download artwork to custom folder if needed if details.get("customartpath") and download_art_custom: details["art"] = download_artwork(details["customartpath"], details["art"]) refresh_needed = True # reload skin to make sure new artwork is visible if refresh_needed: xbmc.sleep(500) xbmc.executebuiltin("ReloadSkin()") # return endresult return details
def manual_set_music_artwork(self, details, mediatype): """manual override artwork options""" from utils import manual_set_artwork if mediatype == "artist" and "artist" in details: header = "%s: %s" % (xbmc.getLocalizedString(13511), details["artist"]) else: header = "%s: %s" % (xbmc.getLocalizedString(13511), xbmc.getLocalizedString(558)) changemade, artwork = manual_set_artwork(details["art"], mediatype, header) # save results if any changes made if changemade: details["art"] = artwork refresh_needed = False download_art = self._mutils.addon.getSetting( "music_art_download") == "true" download_art_custom = self._mutils.addon.getSetting( "music_art_download_custom") == "true" # download artwork to music folder if needed if details.get("diskpath") and download_art: details["art"] = download_artwork(details["diskpath"], details["art"]) refresh_needed = True # download artwork to custom folder if needed if details.get("customartpath") and download_art_custom: details["art"] = download_artwork(details["customartpath"], details["art"]) refresh_needed = True # reload skin to make sure new artwork is visible if refresh_needed: xbmc.sleep(500) xbmc.executebuiltin("ReloadSkin()") # return endresult return details
def manual_set_pvr_artwork(self, title, channel, genre): '''manual override artwork options''' details = self.get_pvr_artwork(title, channel, genre) cache_str = details["cachestr"] # show dialogselect with all artwork options from utils import manual_set_artwork changemade, artwork = manual_set_artwork(details["art"], "pvr") if changemade: details["art"] = artwork # save results in cache self.metadatautils.cache.set(cache_str, details)
def manual_set_pvr_artwork(self, title, channel, genre): """manual override artwork options""" details = self.get_pvr_artwork(title, channel, genre) cache_str = details["cachestr"] # show dialogselect with all artwork options from utils import manual_set_artwork changemade, artwork = manual_set_artwork(details["art"], "pvr") if changemade: details["art"] = artwork # save results in cache self._mutils.cache.set(cache_str, details, expiration=timedelta(days=365))