def queue_source(item, depth=0): """ queue item Keyword Arguments: item -- JenItem to try playing """ from resources.lib.util.url import get_addon_url jen_item = JenItem(item) playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) if "<item>" in str(jen_item): play = False if xbmcaddon.Addon().getSetting("autostart_queue") == "true": if playlist.size() == 0: play = True playlist.add( get_addon_url("get_sources", str(item)), xbmcgui.ListItem( jen_item["title"], iconImage=jen_item.get("thumbnail", ""))) if play: play_queue() else: link = jen_item.get("url", jen_item.get("link", "")) jenlist = JenList(link).get_raw_list() for list_item in jenlist: queue_source(str(list_item), depth + 1) if depth == 0: xbmcgui.Dialog().notification( ADDON.getAddonInfo("name"), _("Finished Queueing").encode('utf-8'), ADDON.getAddonInfo("icon")) xbmc.executebuiltin("Container.Refresh")
def process_item(self, item_xml): if "<sport_stream>" in item_xml: item = JenItem(item_xml) if "games" in item.get("sport_stream", ""): result_item = { 'label': item["title"], 'icon': "https://i.pinimg.com/736x/a2/b9/7c/a2b97c577ff82928cc53591c33ba8f75--stream-online-daytona--live.jpg", 'fanart': item.get("fanart", addon_fanart), 'mode': "Sport_Stream", 'url': item.get("sport_stream", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<sport_stream>" in item_xml: item = JenItem(item_xml) if "games" in item.get("sport_stream", ""): result_item = { 'label': item["title"], 'icon': "https://i.imgur.com/x4yMeZF.png", 'fanart': item.get("https://i.imgur.com/h4CR8az.jpg", addon_fanart), 'mode': "Sport_Stream", 'url': item.get("sport_stream", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def get_info(items, dialog=None): from resources.lib.util.xml import JenItem result = run_hook("get_info", items, dialog) if result: return result koding.reset_db() info = [] num_items = len(items) for index, item_xml in enumerate(items): if dialog: if dialog.iscanceled(): dialog.close() break percent = ((index + 1) * 100) / num_items dialog.update(percent, _("processing metadata"), "%s of %s" % (index + 1, num_items)) if type(item_xml) == dict: item = item_xml else: item = JenItem(item_xml) item_info = {} content = item.get("content", "") try: if content == "movie": item_info = get_movie_metadata(item["imdb"]) elif content in ["tvshow", "season"]: item_info = get_show_metadata(item["imdb"]) elif content == "episode": item_info = get_episode_metadata(item["imdb"], item["season"], item["episode"]) if type(item_info) == list: item_info = {} if not item_info.get("plotoutline", None): item_info["plotoutline"] = item_info.get("plot", "") except Exception as e: koding.dolog("info error: " + repr(e)) summary = item.get("summary", False) if summary: if not item_info or type(item_info) != dict: item_info = {} item_info["plot"] = summary item_info["manual"] = True info.append(item_info) if dialog: dialog.close() tvdb.clear_cache() return info
def process_item(self, item_xml): if "<ytapi>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "YTAPI", 'url': item.get("ytapi", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "<ytdash>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "YTDASH", 'url': item.get("ytdash", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<arconaitv>" in item_xml: item = JenItem(item_xml) if "shows" in item.get("arconaitv", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "get_shows", 'url': item.get("arconaitv", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<password>" in item_xml: item = JenItem(item_xml) if "get/" in item.get("password", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "showing", 'url': item.get("link", "") + ' ' + item.get("password", ""), 'folder': True, 'content': "files", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<musicmp3ru>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "musicmp3ru", 'url': item.get("musicmp3ru", ""), 'folder': True, 'imdb': "0", 'content': item.get("content", "files"), 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<topdocs>" in item_xml: item = JenItem(item_xml) if "tdcategory/" in item.get("topdocs", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "TDCats", 'url': item.get("topdocs", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<Airtable>" in item_xml: item = JenItem(item_xml) if "newest_releases2" in item.get("Airtable", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "newest_releasesv2", 'url': item.get("Airtable", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<otbser>" in item_xml: item = JenItem(item_xml) if "movies" in item.get("otbser", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_otb_search_movies", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): result_item = None if "<heading>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "HEADING", 'url': item.get("heading", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } return result_item elif "<mysettings>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "MYSETTINGS", 'url': item.get("mysettings", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } return result_item elif "<passreq>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PASSREQ", 'url': item.get("passreq", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } return result_item elif "<mode>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': item.get("mode", ""), 'url': item.get("modeurl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } return result_item elif "<pairwith>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PAIRWITH", 'url': item.get("pairwith", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } return result_item elif "<trailer>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PAIRWITH", 'url': item.get("pairwith", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["info"]["trailer"] = item.get("trailer", None) return result_item
def process_item(self, item_xml): #item_xml = remove_non_ascii(item_xml) if "<trakt>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "trakt", 'url': item.get("trakt", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item elif "trakt_tv_show(" in item_xml: item = JenItem(item_xml) url = item.get("link", ")").replace("trakt_tv_show(", "")[:-1] result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "trakt_tv_show", 'url': "trakt_id" + url, 'folder': True, 'imdb': item.get("imdb", ""), 'content': "tvshows", 'season': "0", 'episode': "0", 'info': {}, 'year': item.get("year", ""), 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item elif "trakt_season(" in item_xml: item = JenItem(item_xml) url = item.get("link", ")").replace("trakt_season(", "")[:-1] season = url.split(",")[1] result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "trakt_season", 'url': "trakt_id" + url, 'folder': True, 'imdb': item.get("imdb", ""), 'content': "seasons", 'season': str(season), 'episode': "0", 'info': {}, 'year': item.get("year", ""), 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item elif "trakt_list(" in item_xml: item = JenItem(item_xml) url = item.get("link", ")").replace("trakt_list(", "")[:-1] user_id, list_id = url.split(",") list_url = "https://api.trakt.tv/users/%s/lists/%s/items/" % ( user_id, list_id) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "trakt", 'url': list_url, 'folder': True, 'imdb': item.get("imdb", ""), 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': item.get("year", ""), 'context': {}, "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item return False
def process_item(self, item_xml): if "<tvmaze>" in item_xml: item = JenItem(item_xml) if "country/" in item.get("tvmaze", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "country", 'url': item.get("tvmaze", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "network/" in item.get("tvmaze", ""): item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "network", 'url': item.get("tvmaze", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "show/" in item.get("tvmaze", ""): item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "show", 'url': item.get("tvmaze", ""), 'folder': True, 'imdb': "0", 'content': "tvshows", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "season/" in item.get("tvmaze", ""): item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "season", 'url': item.get("tvmaze", ""), 'folder': True, 'imdb': "0", 'content': "seasons", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': {}, "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "web_channel/" in item.get("tvmaze", ""): item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "web_channel", 'url': item.get("tvmaze", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<Airtable>" in item_xml: item = JenItem(item_xml) if "tv_channels" in item.get("Airtable", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "Tv_channels", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "sports_channels" in item.get("Airtable", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "Sports_channels", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "m3u_lists" in item.get("Airtable", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "M3U", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<sports_leagues>" in item_xml: item = JenItem(item_xml) if "nfl" in item.get("sports_leagues", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_nfl_league", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "mlb" in item.get("sports_leagues", ""): result_item = { 'label': item["title"], 'icon': item.get("https://i.imgur.com/x4yMeZF.png", addon_icon), 'fanart': item.get("https://i.imgur.com/h4CR8az.jpg", addon_fanart), 'mode': "open_the_mlb_league", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "nba" in item.get("sports_leagues", ""): result_item = { 'label': item["title"], 'icon': item.get("https://i.imgur.com/x4yMeZF.png", addon_icon), 'fanart': item.get("https://i.imgur.com/h4CR8az.jpg", addon_fanart), 'mode': "open_the_nba_league", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "nhl" in item.get("sports_leagues", ""): result_item = { 'label': item["title"], 'icon': item.get("https://i.imgur.com/x4yMeZF.png", addon_icon), 'fanart': item.get("https://i.imgur.com/h4CR8az.jpg", addon_fanart), 'mode': "open_the_nhl_league", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<otb_music>" in item_xml: item = JenItem(item_xml) if item.get("otb_music", "") == "all": result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_main_music_page", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "genre|" in item.get("otb_music", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_main_genre_page", 'url': item.get("otb_music", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "cat|" in item.get("otb_music", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_band_Category_page", 'url': item.get("otb_music", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "open|" in item.get("otb_music", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_chosen_category_page", 'url': item.get("otb_music", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "songs|" in item.get("otb_music", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_band_songs_page", 'url': item.get("otb_music", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<B98>" in item_xml: item = JenItem(item_xml) if "serieslist" in item.get("B98", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "B98Series", 'url': item.get("B98", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "playtoon/" in item.get("B98", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "B98Play", 'url': item.get("B98", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<sportshub>" in item_xml: item = JenItem(item_xml) if "nbareplayhd/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "NBAReplayHD", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "sh_nfl/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "NFLReplay", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "sh_mlb/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "MLBReplay", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "sh_nhl_sc/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "NHLCupArchives", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "sh_moto_one/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "SHMotoOne", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "mru_play/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "MRUPlayMedia", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<ytapi>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "YTAPI", 'url': item.get("ytapi", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item elif "<ytdash>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "YTDASH", 'url': item.get("ytdash", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): result_item = None if "<heading>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "HEADING", 'url': item.get("heading", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } return result_item elif "<mysettings>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "MYSETTINGS", 'url': item.get("mysettings", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } return result_item elif "<adult>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PASSREQ", 'url': item.get("adult", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } return result_item elif "<mode>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': item.get("mode", ""), 'url': item.get("modeurl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } return result_item elif "<pairwith>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PAIRWITH", 'url': item.get("pairwith", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } return result_item elif "<trailer>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PAIRWITH", 'url': item.get("pairwith", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["info"]["trailer"] = item.get("trailer", None) return result_item
def process_item(self, item_xml): if "<swift>" in item_xml: item = JenItem(item_xml) if "allthespice" in item.get("swift", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "SwiftMain", 'url': item.get("swift", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "swiftcategory" in item.get("swift", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "SwiftCat", 'url': item.get("swift", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "swiftplay/" in item.get("swift", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "SwiftPlay", 'url': item.get("swift", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<all_sports_replays>" in item_xml: item = JenItem(item_xml) if item.get("all_sports_replays", "") == "all": result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_all_sports", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "leagues/" in item.get("all_sports_replays", ""): big_sports = ['NFL', 'MLB'] other_sports = ['COMBAT_SPORTS', 'MOTOR_SPORTS', 'FOOTBALL'] info = item.get("all_sports_replays", "") tag = info.split("/")[1] if tag in big_sports: result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_main_leagues_replays", 'url': item.get("all_sports_replays", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif tag in other_sports: result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_main_other_leagues_replays", 'url': item.get("all_sports_replays", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item else: result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_other_leagues_replays", 'url': item.get("all_sports_replays", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "seasons/" in item.get("all_sports_replays", ""): if "NFL_SUPERBOWL" in item.get("all_sports_replays", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_other_leagues_replays", 'url': item.get("all_sports_replays", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item else: result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_seasons_replays", 'url': item.get("all_sports_replays", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "week/" in item.get("all_sports_replays", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_weeks_replays", 'url': item.get("all_sports_replays", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "main/" in item.get("all_sports_replays", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_leagues_replays", 'url': item.get("all_sports_replays", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<fxxxmovies>" in item_xml: item = JenItem(item_xml) if "http" in item.get("fxxxmovies", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PlayFXXX", 'url': item.get("fxxxmovies", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "fxmtag/" in item.get("fxxxmovies", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FXXXTags", 'url': item.get("fxxxmovies", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<arconaitv2>" in item_xml: item = JenItem(item_xml) if "shows" in item.get("arconaitv2", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "get_shows2", 'url': item.get("arconaitv2", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "cable" in item.get("arconaitv2", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "get_cable2", 'url': item.get("arconaitv2", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "movies" in item.get("arconaitv2", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "get_movies2", 'url': item.get("arconaitv2", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<sports_leagues>" in item_xml: item = JenItem(item_xml) if item.get("sports_leagues", "") == "all": result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_all_league", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "league/" in item.get("sports_leagues", ""): sports = ['NFL','NBA','NHL'] info = item.get("sports_leagues", "") tag = info.split("/")[1] if tag in sports: result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_league_main", 'url': item.get("sports_leagues", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item else: result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_other_league_main", 'url': item.get("sports_leagues", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "season/" in item.get("sports_leagues", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_league_seasons", 'url': item.get("sports_leagues", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "week/" in item.get("sports_leagues", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_the_week_list", 'url': item.get("sports_leagues", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<tmdb>" in item_xml: item = JenItem(item_xml) result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "tmdb", 'url': item.get("tmdb", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item elif "tmdb_tv_show" in item_xml: item = JenItem(item_xml) url = item.get("link", ")").replace("tmdb_tv_show(", "")[:-1] result_item = { 'label': item["title"], 'icon': item["thumbnail"], 'fanart': item.get("fanart", addon_fanart), 'mode': "tmdb_tv_show", 'url': "tmdb_id" + url, 'folder': True, 'content': "tvshows", 'season': "0", 'episode': "0", 'info': {}, "imdb": item.get("imdb", "0"), 'year': item.get("year", ""), 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item elif "tmdb_season(" in item_xml: item = JenItem(item_xml) url = item.get("link", ")").replace("tmdb_season(", "")[:-1] season = url.split(",")[1] result_item = { 'label': item["title"], 'icon': item["thumbnail"], 'fanart': item.get("fanart", addon_fanart), 'mode': "tmdb_season", 'url': "tmdb_id" + url, 'folder': True, 'content': "seasons", 'season': str(season), 'episode': "0", 'info': {}, "imdb": item.get("imdb", "0"), 'year': item.get("year", ""), 'context': {}, "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<eporner>" in item_xml: item = JenItem(item_xml) if "http" in item.get("eporner", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PlayEporner", 'url': item.get("eporner", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "category/" in item.get("eporner", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "EPorner_Cat", 'url': item.get("eporner", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "currently" in item.get("eporner", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "EPorner_Cat", 'url': item.get("eporner", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "top-rated" in item.get("eporner", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "EPorner_Cat", 'url': item.get("eporner", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "pornstars" in item.get("eporner", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "EPorner_Stars", 'url': item.get("eporner", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "pornstar" in item.get("eporner", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "EPorner_Cat", 'url': item.get("eporner", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "search" in item.get("eporner", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "EPorner_Search", 'url': item.get("eporner", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item['fanart_small'] = result_item["fanart"] return result_item
def choose_quality(link, name=None, selected_link=None): """ choose quality for scraping Keyword Arguments: link -- Jenitem link with sublinks name -- Name to display in dialog (default None) """ import re if name is None: name = xbmc.getInfoLabel('listitem.label') if link.startswith("http") or link.startswith("plugin"): sublinks = [link] else: jen_link = JenItem(link) sublinks = jen_link.getAll("sublink") if not sublinks: sublinks = [jen_link] links = [] message = get_link_message() if selected_link is None: default_link = ADDON.getSetting("default_link") else: default_link = selected_link link_dialog = ADDON.getSetting("use_link_dialog") == "true" direct_links = False for sublink in sublinks: if link_dialog and "search" in sublink: continue if "searchsd" in sublink: if default_link == "SD": return sublink label = 'SD' if message['SD'] != '': label += ' (%s)' % message['SD'] new_item = (label, sublink) elif "search" in sublink: if default_link == "HD": return sublink label = 'HD' if message['HD'] != '': label += ' (%s)' % message['HD'] new_item = (label, sublink) else: direct_links = True match = re.findall("(.*?)\((.*?)\)", sublink) if match: new_item = ('%s' % match[0][1], match[0][0]) else: new_item = ('Link %s' % (int(sublinks.index(sublink)) + 1), sublink) links.append(new_item) if link_dialog and (not direct_links or len(sublinks) > 1): links.append(("Search", "search")) if len(links) == 1: url = links[0][1] return url select = xbmcgui.Dialog().select(name, [i[0] for i in links]) if select == -1: return False else: url = links[select][1] return url
def process_item(self, item_xml): if "<swift>" in item_xml: item = JenItem(item_xml) if "allthespice" in item.get("swift", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "SwiftMain", 'url': item.get("swift", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "swiftcategory" in item.get("swift", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "SwiftCat", 'url': item.get("swift", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "swiftplay/" in item.get("swift", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "SwiftPlay", 'url': item.get("swift", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item
def get_sources(item): """ get video_link and try to play it Keyword Arguments: item -- JenItem to try playing """ result = run_hook("get_sources", item) if result: return if item.startswith("<plugin>"): # link to plugin link = JenItem(item)["link"] sublinks = JenItem(link).getAll("sublink") if sublinks: if len(sublinks) > 1: link = choose_quality(link) else: link = sublinks[0] link = link.replace("&", "&") xbmc.executebuiltin('Container.update(' + link + ')') return item = JenItem(item) link = item["link"] if not link or link.replace("\t", "") == "": return meta = JenItem(item["meta"]) title = meta["title"] year = meta.get("year", '').split("-")[0].strip() imdb = meta.get("imdb", "") tvdb = meta.get("tvdb", "") season = meta.get("season", "") episode = meta.get("episode", "") tvshowtitle = meta.get("tvshowtitle", None) premiered = meta.get("premiered", "") try: premiered = premiered.split("-")[0].strip() except: if len(premiered) == 4: pass elif not premiered: pass else: koding.dolog("wrong premiered format") busy_dialog = xbmcgui.DialogProgress() dialog = xbmcgui.Dialog() icon = ADDON.getAddonInfo('icon') jenplayer = JenPlayer(resume=False) try: spec = { "identifier": imdb, "season": season or "0", "episode": episode or "0" } match = koding.Get_From_Table("watched", spec) if match: match = match[0] if match["currentTime"] and not match["currentTime"] == "0": if dialog.yesno(ADDON.getAddonInfo("name"), _("Previous playback detected"), yeslabel=_("Resume"), nolabel=_("Restart")): jenplayer = JenPlayer(resume=True) except: pass jenplayer.setItem(item) busy_dialog.create(xbmcaddon.Addon().getAddonInfo('name'), _("Processing Link")) preset = choose_quality(link) message = get_searching_message(preset) played = False infolabels = {} if preset: preset = preset.replace("&", "&") busy_dialog.update(0, message) listitem = None fetch_meta = ADDON.getSetting("metadata") == "true" listitem = xbmcgui.ListItem( path=link, iconImage=item.get("thumbnail", icon), thumbnailImage=item.get("thumbnail", icon)) infolabels = {} if fetch_meta and imdb != "0": # only try valid items with imdb try: info, created = get_info([item.item_string]) if info and type(info) == dict: infolabels = info except: pass else: infolabels["title"] = title infolabels["name"] = title if "plotoutline" not in infolabels: infolabels["plotoutline"] = infolabels.get("plot", "") if item.get("content", "") == "song": listitem.setInfo(type='Music', infoLabels={'title': meta.get("title", ""), 'artist': meta.get("artist", "")}) else: listitem.setInfo(type="video", infoLabels=infolabels) listitem.setLabel(item.get("title", item.get("name", ""))) if "search" in preset: exclude_scrapers_content = item.get("exclude_scrapers", "") if exclude_scrapers_content: exclude_scrapers = exclude_scrapers_content.split(";") else: exclude_scrapers = None # nanscraper link if item.get("content", "") == "song": artist = item.get("artist", "") played = Sources.get_music_sources(title, artist, preset=preset, dialog=busy_dialog, exclude=exclude_scrapers, listitem=listitem, player=jenplayer) else: played = Sources.get_sources( title, year, imdb, tvdb, season, episode, tvshowtitle, premiered, preset=preset, dialog=busy_dialog, listitem=listitem, exclude=exclude_scrapers, player=jenplayer) elif preset.startswith("http") or preset.startswith("plugin"): # direct link if "/playlist" in preset and "youtube" in preset: busy_dialog.close() xbmc.executebuiltin('Container.update(' + preset + ')') return elif "plugin://plugin.video.youtube/play/?video_id=" in preset: xbmc.executebuiltin("PlayMedia(%s)" % preset) played = True elif item["content"] == "image": busy_dialog.close() xbmc.executebuiltin("ShowPicture(%s)" % preset) played = True else: played = koding.Play_Video( preset, showbusy=False, ignore_dp=True, item=listitem, player=jenplayer, resolver=resolveurl) else: # who knows busy_dialog.close() koding.dolog("unknown link type: " + repr(preset)) raise Exception() busy_dialog.close() if played: jenplayer.keep_alive()
def process_item(self, item_xml): if "<cnw>" in item_xml: item = JenItem(item_xml) if "http" in item.get("cnw", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PlayCNW", 'url': item.get("cnw", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "category/" in item.get("cnw", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "CNW_Cat", 'url': item.get("cnw", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "recent" in item.get("cnw", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "CNW_Cat", 'url': item.get("cnw", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "popular" in item.get("cnw", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "CNW_Cat", 'url': item.get("cnw", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "pornstar" in item.get("cnw", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "CNW_ShowStarVids", 'url': item.get("cnw", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "search" in item.get("cnw", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "CNW_Stars", 'url': item.get("cnw", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<bml>" in item_xml: item = JenItem(item_xml) if "open" in item.get("bml", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_bml_movies2", 'url': item.get("bml", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "genre" in item.get("bml", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_action_movies2", 'url': item.get("bml", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "movie_meta" in item.get("bml", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_movie_meta_movies2", 'url': item.get("bml", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "genre_meta" in item.get("bml", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_genre_meta_movies2", 'url': item.get("bml", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "search" in item.get("bml", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "open_bml_search", 'url': item.get("bml", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def get_sources(item): """ get video_link and try to play it Keyword Arguments: item -- JenItem to try playing """ result = run_hook("get_sources", item) if result: return if item.startswith("<plugin>"): # link to plugin link = JenItem(item)["link"] sublinks = JenItem(link).getAll("sublink") if sublinks: if len(sublinks) > 1: link = choose_quality(link) else: link = sublinks[0] link = link.replace("&", "&") xbmc.executebuiltin("Container.update(" + link + ")") return item = JenItem(item) link = item["link"] if not link or link.replace("\t", "") == "": return meta = JenItem(item["meta"]) title = meta["title"] year = meta.get("year", "").split("-")[0].strip() imdb = meta.get("imdb", "") tvdb = meta.get("tvdb", "") season = meta.get("season", "") episode = meta.get("episode", "") tvshowtitle = meta.get("tvshowtitle", None) premiered = meta.get("premiered", "") try: premiered = premiered.split("-")[0].strip() except: if len(premiered) == 4: pass elif not premiered: pass else: koding.dolog("wrong premiered format") busy_dialog = xbmcgui.DialogProgress() dialog = xbmcgui.Dialog() icon = ADDON.getAddonInfo("icon") jenplayer = JenPlayer(resume=False) try: spec = {"identifier": imdb, "season": season or "0", "episode": episode or "0"} match = koding.Get_From_Table("watched", spec) if match: match = match[0] if match["currentTime"] and not match["currentTime"] == "0": if dialog.yesno( ADDON.getAddonInfo("name"), _("Previous playback detected"), yeslabel=_("Resume"), nolabel=_("Restart"), ): jenplayer = JenPlayer(resume=True) except: pass jenplayer.setItem(item) busy_dialog.create(xbmcaddon.Addon().getAddonInfo("name"), _("Processing Link")) preset = choose_quality(link) message = get_searching_message(preset) played = False infolabels = {} if preset: preset = preset.replace("&", "&") busy_dialog.update(0, message) listitem = None fetch_meta = ADDON.getSetting("metadata") == "true" listitem = xbmcgui.ListItem( path=link, iconImage=item.get("thumbnail", icon), thumbnailImage=item.get("thumbnail", icon), ) infolabels = {} if fetch_meta and imdb != "0": # only try valid items with imdb try: info, created = get_info([item.item_string]) if info and type(info) == dict: infolabels = info except: pass else: infolabels["title"] = title infolabels["name"] = title if "plotoutline" not in infolabels: infolabels["plotoutline"] = infolabels.get("plot", "") if item.get("content", "") == "song": listitem.setInfo( type="Music", infoLabels={ "title": meta.get("title", ""), "artist": meta.get("artist", ""), }, ) else: listitem.setInfo(type="video", infoLabels=infolabels) listitem.setLabel(item.get("title", item.get("name", ""))) if "search" in preset: exclude_scrapers_content = item.get("exclude_scrapers", "") if exclude_scrapers_content: exclude_scrapers = exclude_scrapers_content.split(";") else: exclude_scrapers = None # nanscraper link if item.get("content", "") == "song": artist = item.get("artist", "") played = Sources.get_music_sources( title, artist, preset=preset, dialog=busy_dialog, exclude=exclude_scrapers, listitem=listitem, player=jenplayer, ) else: played = Sources.get_sources( title, year, imdb, tvdb, season, episode, tvshowtitle, premiered, preset=preset, dialog=busy_dialog, listitem=listitem, exclude=exclude_scrapers, player=jenplayer, ) elif preset.startswith("http") or preset.startswith("plugin") or preset.endswith('.torrent') or preset.startswith('magnet'): # direct link if "/playlist" in preset and "youtube" in preset: busy_dialog.close() xbmc.executebuiltin("Container.update(" + preset + ")") return elif "plugin://plugin.video.youtube/play/?video_id=" in preset: xbmc.executebuiltin("PlayMedia(%s)" % preset) played = True elif item["content"] == "image": busy_dialog.close() xbmc.executebuiltin("ShowPicture(%s)" % preset) played = True else: played = koding.Play_Video( preset, showbusy=False, ignore_dp=True, item=listitem, player=jenplayer, resolver=resolveurl, ) else: # who knows busy_dialog.close() koding.dolog("unknown link type: " + repr(preset)) raise Exception() busy_dialog.close() if played: jenplayer.keep_alive()
def process_item(self, item_xml): if "<fullmatch>" in item_xml: item = JenItem(item_xml) if "nba_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_NBA_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "nfl_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_NFL_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "nhl_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_NHL_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "mlb_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_MLB_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "motor_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_MOTOR_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "wwe_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_WWE_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<sportshub>" in item_xml: item = JenItem(item_xml) if "nbareplayhd/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "NBAReplayHD", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "sh_nfl/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "NFLReplay", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "sh_mlb/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "MLBReplay", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "sh_nhl_sc/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "NHLCupArchives", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "sh_moto_one/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "SHMotoOne", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "mru_play/" in item.get("sportshub", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "MRUPlayMedia", 'url': item.get("sportshub", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def choose_quality(link, name=None, selected_link=None): """ choose quality for scraping Keyword Arguments: link -- Jenitem link with sublinks name -- Name to display in dialog (default None) """ import re if name is None: name = xbmc.getInfoLabel("listitem.label") if link.startswith("http") or link.startswith("plugin"): sublinks = [link] else: jen_link = JenItem(link) sublinks = jen_link.getAll("sublink") if not sublinks: sublinks = [jen_link] links = [] message = get_link_message() if selected_link is None: default_link = ADDON.getSetting("default_link") else: default_link = selected_link link_dialog = ADDON.getSetting("use_link_dialog") == "true" direct_links = False for sublink in sublinks: if link_dialog and "search" in sublink: continue if "searchsd" in sublink: if default_link == "SD": return sublink label = "SD" if message["SD"] != "": label += " (%s)" % message["SD"] new_item = (label, sublink) elif "search" in sublink: if default_link == "HD": return sublink label = "HD" if message["HD"] != "": label += " (%s)" % message["HD"] new_item = (label, sublink) else: direct_links = True match = re.findall("(.*?)\((.*?)\)", sublink) if match: new_item = ("%s" % match[0][1], match[0][0]) else: new_item = ("Link %s" % (int(sublinks.index(sublink)) + 1), sublink) links.append(new_item) if link_dialog and (not direct_links or len(sublinks) > 1): links.append(("Search", "search")) if len(links) == 1: url = links[0][1] return url select = xbmcgui.Dialog().select(name, [i[0] for i in links]) if select == -1: return False else: url = links[select][1] return url
def process_item(self, item_xml): if "<imdburl>" in item_xml: item = JenItem(item_xml) if "season/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbseason", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "episode/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbepisode", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "years/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbyears", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "yearstv/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbyearstv", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "list/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdblists", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "keyword/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdblists", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "actors/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbactors", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "name/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbactorspage", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "www.imdb.com" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbNextPage", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "genres/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbgenres", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "genrestv/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbgenrestv", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "chart/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbchart", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "charttv/" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbcharttv", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "searchmovies" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "searchmovies", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "searchseries" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "searchseries", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "searchboth" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "searchboth", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "searchkeywords" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "searchkeywords", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "/lists" in item.get("imdburl", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "imdbuser", 'url': item.get("imdburl", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<moviefone>" in item_xml: item = JenItem(item_xml) if "trailers" in item.get("moviefone", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "get_moviefone_trailers", 'url': item.get("moviefone", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "search" in item.get("moviefone", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "search_moviefone_trailers", 'url': item.get("moviefone", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "link" in item.get("moviefone", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "get_moviefone_trailer_link", 'url': item.get("moviefone", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "result" in item.get("moviefone", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "get_moviefone_result_link", 'url': item.get("moviefone", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<fullmatch>" in item_xml: item = JenItem(item_xml) if "nba_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_NBA_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "nfl_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_NFL_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "nhl_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_NHL_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "mlb_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_MLB_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "motor_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_MOTOR_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "wwe_replay/" in item.get("fullmatch", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "FullMatch_WWE_Replays", 'url': item.get("fullmatch", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<mtorture>" in item_xml: item = JenItem(item_xml) if "category/" in item.get("mtorture", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "MTortureByCat", 'url': item.get("mtorture", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "tag/" in item.get("mtorture", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "MTortureByTag", 'url': item.get("mtorture", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "play/" in item.get("mtorture", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PlayMTorture", 'url': item.get("mtorture", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<Airtable>" in item_xml: item = JenItem(item_xml) if "tv_channels" in item.get("Airtable", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "Tv_channels", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "sports_channels" in item.get("Airtable", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "Sports_channels", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "247" in item.get("Airtable", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "247", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "channels2" in item.get("Airtable", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "channels2", 'url': "", 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "cats/" in item.get("Airtable", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "show_category_channels", 'url': item.get("Airtable", ""), 'folder': True, 'imdb': "0", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<wctoon>" in item_xml: item = JenItem(item_xml) if "wcepisode/" in item.get("wctoon", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "WCEpisodes", 'url': item.get("wctoon", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "wcsearch" in item.get("wctoon", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "WCSearch", 'url': item.get("wctoon", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "list-videos/" in item.get("wctoon", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "WCListVideos", 'url': item.get("wctoon", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "direct/" in item.get("wctoon", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "WCPlayVideo", 'url': item.get("wctoon", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "main/" in item.get("wctoon", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "WCMain", 'url': item.get("wctoon", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "popular-cartoon" in item.get("wctoon", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "WCPopular", 'url': item.get("wctoon", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "wcdaily-updates" in item.get("wctoon", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "WCDaily", 'url': item.get("wctoon", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "category/" in item.get("wctoon", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "WatchCartoon", 'url': item.get("wctoon", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<mop>" in item_xml: item = JenItem(item_xml) if "list/" in item.get("mop", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "MassivelyOP", 'url': item.get("mop", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "http" in item.get("mop", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PlayMOP", 'url': item.get("mop", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = {'fanart_image': result_item["fanart"]} result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<podcastone>" in item_xml: item = JenItem(item_xml) if "pcocategory/" in item.get("podcastone", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PCOCats", 'url': item.get("podcastone", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "pcoshow/" in item.get("podcastone", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PCOShow", 'url': item.get("podcastone", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } elif "pcoepisode/" in item.get("podcastone", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "PCOEpisode", 'url': item.get("podcastone", ""), 'folder': False, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item
def process_item(self, item_xml): if "<tvmaze>" in item_xml: item = JenItem(item_xml) if "country/" in item.get("tvmaze", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "country", 'url': item.get("tvmaze", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "network/" in item.get("tvmaze", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "network", 'url': item.get("tvmaze", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "show/" in item.get("tvmaze", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "show", 'url': item.get("tvmaze", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "season/" in item.get("tvmaze", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "season", 'url': item.get("tvmaze", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item elif "web_channel/" in item.get("tvmaze", ""): result_item = { 'label': item["title"], 'icon': item.get("thumbnail", addon_icon), 'fanart': item.get("fanart", addon_fanart), 'mode': "web_channel", 'url': item.get("tvmaze", ""), 'folder': True, 'imdb': "0", 'content': "files", 'season': "0", 'episode': "0", 'info': {}, 'year': "0", 'context': get_context_items(item), "summary": item.get("summary", None) } result_item["properties"] = { 'fanart_image': result_item["fanart"] } result_item['fanart_small'] = result_item["fanart"] return result_item