diff --git a/channels/cineblog01.py b/channels/cineblog01.py index 4a6d655c..20c56271 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -71,15 +71,16 @@ def newest(categoria): except: import sys for line in sys.exc_info(): - support.infoger.error("{0}".format(line)) + logger..error("{0}".format(line)) return [] def search(item, text): - support.info(item.url, "search", text) - + logger.info(item, "search", text) + if item.contentType == 'tvshow': item.url = host + '/serietv/' + else: item.url = host try: - item.url = item.url + "/?s=" + text.replace(' ', '+') + item.url = item.url + "?s=" + text.replace(' ', '+') return peliculas(item) # Continua la ricerca in caso di errore @@ -100,6 +101,7 @@ def peliculas(item): # debug= True if 'newest' in item.args: if '/serietv/' not in item.url: + debug = True pagination = '' patronBlock = r'Ultimi 100 film [^:]+:(?P.*?)<\/td>' patron = r']+)"?>(?P[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>' diff --git a/platformcode/infoplus.py b/platformcode/infoplus.py index 3209f82d..a040ac9d 100644 --- a/platformcode/infoplus.py +++ b/platformcode/infoplus.py @@ -1,1093 +1,478 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------ -# infoplus ventana con información del Item +# infoplus window with item information # ------------------------------------------------------------ - -from future import standard_library -standard_library.install_aliases() - -import re, sys, xbmc, xbmcaddon, xbmcgui -PY3 = False -if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int - -from builtins import range -from threading import Thread -from core import httptools, scrapertools, filetools, tmdb +import xbmc, xbmcgui, json, sys, requests, re +from core import support, tmdb, filetools from core.item import Item -from core.support import typo, dbg -from core.scrapertools import decodeHtmlentities as dhe -from platformcode import config, logger, platformtools +from platformcode import config, platformtools +from platformcode.logger import log +from core.scrapertools import decodeHtmlentities, htmlclean -info_language = ["de", "en", "es", "fr", "it", "pt"] # from videolibrary.json -def_lang = info_language[config.get_setting("info_language", "videolibrary")] +PY3 = False +if sys.version_info[0] >= 3: PY3 = True +if PY3: from concurrent import futures +else: from concurrent_py2 import futures -max_poster = 6 +info_list = [] +SearchWindows = [] +api = 'k_0tdb8a8y' -global mainWindow -mainWindow = list() -ActorsWindow = None -TrailerWindow = None -relatedWindow = None -imagesWindow = None -ActorInfoWindow = None -SearchWindow = None -SearchWindows = list() +# Control ID +FANART = 30000 +NUMBER = 30001 +POSTER_BTN = 30010 +TITLE = 30002 +TAGLINE = 30003 +PLOT = 30004 +RATING_ICON = 30005 +RATING = 30006 +TRAILER = 30007 +SEARCH = 30008 +BTN_NEXT = 30009 +BTN_PREV = 30010 +LOADING = 30011 +COMMANDS = 30012 +RECOMANDED = TRAILERS = 30500 +CAST = 30501 +CASTMOVIES = 30502 -exit_loop = False - -ACTION_SHOW_FULLSCREEN = 36 -ACTION_GESTURE_SWIPE_LEFT = 511 -ACTION_SELECT_ITEM = 7 -ACTION_PREVIOUS_MENU = 10 -ACTION_MOVE_LEFT = 1 -ACTION_MOVE_RIGHT = 2 -ACTION_MOVE_UP = 3 -ACTION_MOVE_DOWN = 4 - -xinfoplus_set = config.get_setting("infoplus_set") - -def start(item, recommendations=[], from_window=False): - main_window = main(item=item, recommendations=recommendations, from_window=from_window) - try: - mainWindow.append(main_window) - main_window.doModal() - except: - return +# Actions +LEFT = 1 +RIGHT = 2 +UP = 3 +DOWN = 4 +EXIT = 10 +BACKSPACE = 92 -class main(xbmcgui.WindowDialog): + +def Main(item): + if type(item) == Item: + item.channel = item.from_channel + global ITEM + ITEM = item + Info = xbmcgui.ListItem(item.infoLabels['title']) + for key, value in item.infoLabels.items(): + Info.setProperty(key, str(value)) + else: + Info = item + + main = MainWindow('InfoPlus.xml', config.get_runtime_path()) + add({'class':main, 'info':Info, 'id':RECOMANDED, RECOMANDED:0, CAST:0}) + modal() + +class MainWindow(xbmcgui.WindowXMLDialog): def __init__(self, *args, **kwargs): - self.item = kwargs.get('item') - self.recommendations = kwargs.get('recommendations') - self.from_window = kwargs.get('from_window', False) - self.images = {} - - if self.item.contentType == "movie": - Type = "movie" - search_type = "movie" - rating_icon = imagepath('tmdb') - else: - Type = "serie" - search_type = "tv" - rating_icon = imagepath('tvdb') - - info_copy = dict(self.item.infoLabels) - self.item.infoLabels.pop("season", None) - self.item.infoLabels.pop("episode", None) - if not self.item.infoLabels["year"] and not self.item.infoLabels["tmdb_id"]: - platformtools.dialog_notification(config.get_localized_string(60471), config.get_localized_string(60472) % config.get_localized_string(60329)) - global mainWindow - self.close() - del mainWindow - return - - tmdb.set_infoLabels_item(self.item, True) - self.infoLabels = self.item.infoLabels - self.infoLabels["season"] = info_copy.get("season", None) - self.infoLabels["episode"] = info_copy.get("episode", None) - - if not self.infoLabels["tmdb_id"]: - platformtools.dialog_notification(config.get_localized_string(60473), config.get_localized_string(60474) % config.get_localized_string(60329)) - global mainWindow - self.close() - del mainWindow - return - - Title = typo(self.infoLabels.get("title"), 'bold') - if self.infoLabels.get("rating"): rating = typo(self.infoLabels["rating"], 'bold') - else: rating = typo('N/A', 'bold') - - self.infoLabels["plot"] = self.infoLabels.get("plot") - - thread = Thread(target=get_recomendations, args=[self.item, self.infoLabels, self.recommendations]) - thread.setDaemon(True) - thread.start() - - if self.infoLabels.get("status") == "Ended" and Type == "serie": status = config.get_localized_string(60478) - elif self.infoLabels.get("status") and Type == "serie": status = config.get_localized_string(60479) - else: status = "%s" - - if self.infoLabels.get("tagline") and Type == "serie": self.infoLabels["tagline"] = status % "(" + self.infoLabels["tagline"] + ")" - elif not self.infoLabels.get("tagline") and Type == "serie": self.infoLabels["tagline"] = status % config.get_localized_string(60480) % self.infoLabels.get("number_of_seasons", "---") - else: self.infoLabels["tagline"] = status % self.infoLabels.get("tagline", "") - - if self.infoLabels["tmdb_id"]: - otmdb = tmdb.Tmdb(id_Tmdb=self.infoLabels["tmdb_id"], tipo=search_type) - self.item.images = otmdb.result.get("images", {}) - for key, value in list(self.item.images.items()): - if not value: self.item.images.pop(key) - - if not self.infoLabels.get("originaltitle"): self.infoLabels["originaltitle"] = otmdb.result.get("original_title", otmdb.result.get("original_name", "")) - self.trailers = otmdb.get_videos() - if otmdb.result.get("runtime", 0): self.infoLabels["duration"] = int(otmdb.result.get("runtime", 0)) - else: - self.trailers = [] - - if self.item.contentType != "movie": - try: - # look for the theme of the series - Title = re.sub(r'\[.*?\]', '', Title) - Title = self.infoLabels.get("originaltitle", Title) - Title = re.sub("'", "", Title) - url_tvthemes = "http://televisiontunes.com/search.php?q=%s" % Title.replace(' ', '+') - - data = httptools.downloadpage(url_tvthemes).data - page_theme = scrapertools.find_single_match(data, r'<!-- sond design -->.*?<li><a href="([^"]+)"') - - if page_theme: - page_theme = "http://televisiontunes.com" + page_theme - data = httptools.downloadpage(page_theme).data - song = scrapertools.find_single_match(data, r'<form name="song_name_form">.*?type="hidden" value="(.*?)"') - song = song.replace(" ", "%20") - pl = xbmc.PlayList(xbmc.PLAYLIST_MUSIC) - pl.clear() - pl.add(song) - self.player = xbmc.Player() - self.player.play(pl) - except: - import traceback - logger.error(traceback.format_exc()) - - if not self.infoLabels.get("fanart") and self.images: - try: - if self.item.contentType == "movie": - self.infoLabels["fanart"] = self.images.get("moviebackground", self.images.get("hdmovieclearart", self.images.get("movieart")))[0].get("url") - else: - self.infoLabels["fanart"] = self.images.get("showbackground", self.images.get("hdclearart", self.images.get("clearart")))[0].get("url") - except: - self.infoLabels["fanart"] = imagepath('background.jpg') - import traceback - logger.error(traceback.format_exc()) - - elif self.infoLabels.get("season") and self.images.get("showbackground"): - for imagen in self.images["showbackground"]: - if imagen.get("season") == str(self.infoLabels.get("season", "")): - self.infoLabels["fanart"] = imagen["url"] - break - - if not self.infoLabels.get("fanart"): self.infoLabels["fanart"] = imagepath('background.jpg') - - self.name = re.sub(r'(\[.*?\])', '', self.infoLabels["title"]) - self.buttons = [] - - skin = xbmc.getSkinDir() - self.fonts = get_fonts(skin) - - #### Kodi 18 Compatibility #### - if config.get_platform(True)['num_version'] < 18: self.setCoordinateResolution(2) - - self.background = xbmcgui.ControlImage(0, 0, 1280, 720, imagepath('white'), colorDiffuse='FF232323') - self.addControl(self.background) - self.fanart = xbmcgui.ControlImage(0, 0, 1280, 720, self.infoLabels.get("fanart", ""), 1, colorDiffuse='88FFFFFF') - self.addControl(self.fanart) - self.bar = xbmcgui.ControlImage(0, 680, 1280, 40, imagepath('white'), colorDiffuse='FF232323') - self.addControl(self.bar) - self.bar.setAnimations([('WindowOpen', 'effect=slide start=0,40 end=0,0 delay=100 time=200'),('WindowClose', 'effect=slide start=0,0 end=0,40 delay=100 time=200')]) - - # TITLE - self.title = xbmcgui.ControlTextBox(40, 40, 750, 30, font=self.fonts["30"]) - self.addControl(self.title) - self.title.setAnimations([('WindowOpen', 'effect=slide start=-750,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-750,0 delay=100 time=200')]) - self.title.setText(Title) - - # TAGLINE - self.tagline = xbmcgui.ControlFadeLabel(40, 73, 750, 30, font=self.fonts["12"]) - self.addControl(self.tagline) - self.tagline.setAnimations([('WindowOpen', 'effect=slide start=-750,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-750,0 delay=100 time=200')]) - self.tagline.addLabel(self.infoLabels.get("tagline")) - - # DURATION - self.duration = xbmcgui.ControlTextBox(40, 100, 750, 30, self.fonts["10"]) - self.addControl(self.duration) - self.duration.setAnimations([('WindowOpen', 'effect=slide start=-750,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-750,0 delay=100 time=200')]) - self.duration.setText(config.get_localized_string(70252) % self.infoLabels["duration"] if self.item.contentType == "movie" and self.infoLabels.get("duration", 0) else '') - - # RATING - #icon - self.icon = xbmcgui.ControlImage(40, 140, 50, 50, rating_icon) - self.addControl(self.icon) - self.icon.setAnimations([('WindowOpen', 'effect=slide start=-40,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-40,0 delay=100 time=200')]) - - # rating - self.rating = xbmcgui.ControlTextBox(100, 150, 150, 40) - self.addControl(self.rating) - self.rating.setAnimations([('WindowOpen', 'effect=slide start=-100,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-100,0 delay=100 time=200')]) - self.rating.setText(rating) - - # TRAILER - self.trailerButton = xbmcgui.ControlButton(180, 140, 50, 50, '', noFocusTexture=imagepath('trailer_no_focus'), focusTexture=imagepath('trailer_focus')) - self.trailerButton.setAnimations([('WindowOpen', 'effect=slide start=-170,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-170,0 delay=100 time=200')]) - self.addControl(self.trailerButton) - self.buttons.append(self.trailerButton) - - # ACTOR - self.actorButton = xbmcgui.ControlButton(240, 140, 50, 50, '', noFocusTexture=imagepath('actors_no_focus'), focusTexture=imagepath('actors_focus')) - self.trailerButton.setAnimations([('WindowOpen', 'effect=slide start=-220,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-220,0 delay=100 time=200')]) - self.addControl(self.actorButton) - self.buttons.append(self.actorButton) - - # SEARCH - self.global_search = xbmcgui.ControlButton(300, 140, 50, 50, '', noFocusTexture=imagepath('search_no_focus'), focusTexture=imagepath('search_focus')) - self.trailerButton.setAnimations([('WindowOpen', 'effect=slide start=-270,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-270,0 delay=100 time=200')]) - self.addControl(self.global_search) - self.buttons.append(self.global_search) - - self.setFocus(self.trailerButton) - - # PLOT - self.plot = xbmcgui.ControlTextBox(40, 240, 760, 360, font=self.fonts["24"]) - self.addControl(self.plot) - self.plot.setAnimations([('WindowOpen', 'effect=slide start=-750,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-750,0 delay=100 time=200')]) - try: self.plot.autoScroll(10000, 2000, 30000) - except: xbmc.executebuiltin(config.get_localized_string(70500)) - self.plot.setText(dhe(typo(self.infoLabels.get("plot", ""),'bold'))) - - # POSTER - self.poster = xbmcgui.ControlImage(880, 40, 400, 600, self.item.thumbnail) - self.addControl(self.poster) - self.poster.setAnimations([('WindowOpen', 'effect=slide start=+400,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=+400,0 delay=100 time=200')]) - self.thumbnail = xbmcgui.ControlButton(880, 40, 400, 600, '', focusTexture=imagepath('focus'), noFocusTexture=imagepath('nofocus')) - self.thumbnail.setAnimations([('WindowOpen', 'effect=slide start=+400,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=+400,0 delay=100 time=200')]) - self.addControl(self.thumbnail) - self.buttons.append(self.thumbnail) - - # BUTTON LEFT - self.btn_left = xbmcgui.ControlButton(0, 680, 40, 40, '', imagepath('previous_focus'), imagepath('previous_no_focus')) - self.addControl(self.btn_left) - self.buttons.append(self.btn_left) - self.btn_left.setAnimations([('WindowOpen', 'effect=slide start=0,40 end=0,0 delay=100 time=200'),('WindowClose', 'effect=slide start=0,0 end=0,40 delay=100 time=200')]) - - # RECOMMENDED - xbmc.sleep(200) - self.max_movies = max_poster - self.idps = [] - self.max_movies_buttons = [] - self.focus = 0 - i = 0 - count = 0 - if thread: - while thread.isAlive(): xbmc.sleep(100) - for idp, title, thumbnail in self.recommendations: - if count % max_poster == 0: i = 0 - if thumbnail: - self.image = xbmcgui.ControlButton(40 + i, 420 + 260, 200, 300, '', thumbnail, thumbnail) - self.buttons.append(self.image) - if count < max_poster: - self.addControl(self.image) - self.image.setAnimations([('focus', 'effect=slide start=0,0 end=0,-260 time=200'),('unfocus', 'effect=slide start=-0,-260 end=0,0 time=200'),('WindowOpen', 'effect=slide start=0,40 end=0,0 delay=100 time=200 conditional=true'),('WindowClose', 'effect=slide start=0,0 end=0,40 delay=100 time=200 conditional=true')]) - self.idps.append([self.image, title, idp, thumbnail]) - self.max_movies_buttons.append([self.image, title]) - i += 200 - count += 1 - xbmc.sleep(200) - - # BUTTON RIGHT - self.btn_right = xbmcgui.ControlButton(1240, 680, 40, 40, '', imagepath('next_focus'), imagepath('next_no_focus')) - self.addControl(self.btn_right) - self.buttons.append(self.btn_right) - self.btn_right.setAnimations([('WindowOpen', 'effect=slide start=0,40 end=0,0 delay=100 time=200'),('WindowClose', 'effect=slide start=0,0 end=0,40 delay=100 time=200')]) - xbmc.sleep(200) - - - def onAction(self, action): - if action == ACTION_PREVIOUS_MENU or action == ACTION_GESTURE_SWIPE_LEFT or action == 110 or action == 92: - global mainWindow - xbmc.executebuiltin('PlayMedia(Stop)') - self.close() - mainWindow.pop() - if not mainWindow: - del mainWindow - else: - xbmc.sleep(800) - mainWindow[-1].doModal() - - if action == ACTION_MOVE_RIGHT: - if self.getFocusId() not in [3014, 3022]: - if self.focus < len(self.buttons) - 1: - self.focus += 1 - while True: - id_focus = str(self.buttons[self.focus].getId()) - if xbmc.getCondVisibility('[Control.IsVisible(' + id_focus + ')]'): - self.setFocus(self.buttons[self.focus]) - break - self.focus += 1 - if self.focus == len(self.buttons): - break - elif self.getFocusId() in [3014]: - self.focus = 0 - self.setFocus(self.trailerButton) - elif self.getFocusId() in [3022]: - self.focus = 4 - self.setFocus(self.btn_left) - - - if action == ACTION_MOVE_DOWN or action == ACTION_MOVE_UP: - if self.focus < 4: - self.focus = 4 - self.setFocus(self.btn_left) - else: - self.focus = 0 - self.setFocus(self.trailerButton) - - if action == ACTION_MOVE_LEFT: - if self.getFocusId() not in [3009, 3015]: - if self.focus > 0: - self.focus -= 1 - while True: - id_focus = str(self.buttons[self.focus].getId()) - if xbmc.getCondVisibility('[Control.IsVisible(' + id_focus + ')]'): - self.setFocus(self.buttons[self.focus]) - break - self.focus -= 1 - if self.focus == 0: - break - elif self.getFocusId() in [3009]: - self.focus = 3 - self.setFocus(self.thumbnail) - elif self.getFocusId() in [3015]: - self.focus = len(self.buttons) - 1 - self.setFocus(self.btn_right) - - if action == 105 or action == 6: - xbmc.executebuiltin('SendClick(%s)' % self.btn_right.getId()) - - if action == 104 or action == 5: - xbmc.executebuiltin('SendClick(%s)' % self.btn_left.getId()) - - def onControl(self, control): - if control == self.actorButton: - global ActorsWindow - ActorsWindow = Actors('DialogSelect.xml', config.get_runtime_path(), tmdb_id=self.infoLabels["tmdb_id"], item=self.item, fonts=self.fonts) - ActorsWindow.doModal() - - elif control == self.trailerButton: - global TrailerWindow - item = self.item.clone(thumbnail=self.infoLabels.get("thumbnail", ""), contextual=True, contentTitle=self.name, windowed=True, infoLabels=self.infoLabels) - Trailer('TrailerWindow.xml', config.get_runtime_path()).Start(item, self.trailers) - - elif control == self.thumbnail: - global imagesWindow - imagesWindow = images(tmdb=self.item.images) - imagesWindow.doModal() - - elif control == self.global_search: - if self.from_window: - itemlist = search_type(self, self.item.from_channel) - SearchWindow = Search('DialogSelect.xml', config.get_runtime_path(), itemlist=itemlist, item=self.item.clone(channel=self.item.from_channel)) - else: - itemlist = search_type(self) - SearchWindow = Search('DialogSelect.xml', config.get_runtime_path(), itemlist=itemlist, item=self.item.clone()) - - if not itemlist and self.from_window: - if platformtools.dialog_yesno(typo(self.item.contentTitle,'bold'), config.get_localized_string(70820) % self.item.from_channel): - itemlist = search_type(self) - SearchWindow = Search('DialogSelect.xml', config.get_runtime_path(), itemlist=itemlist, item=self.item.clone()) - if itemlist: - global SearchWindow - SearchWindow.doModal() - else: - platformtools.dialog_ok(typo(self.item.contentTitle,'bold'), config.get_localized_string(70819) % self.item.from_channel) - - elif control == self.btn_right: - try: - i = 1 - count = 0 - for photo, title in self.max_movies_buttons: - if i > self.max_movies - max_poster and i <= self.max_movies and count < max_poster: - self.removeControls([photo]) - count += 1 - elif i > self.max_movies and count < max_poster * 2: - self.addControl(photo) - photo.setAnimations([('focus', 'effect=slide start=0,0 end=0,-260 time=200'),('unfocus', 'effect=slide start=-0,-260 end=0,0 time=200'),('WindowOpen', 'effect=slide start=0,40 end=0,0 delay=100 time=200 conditional=true'),('WindowClose', 'effect=slide start=0,0 end=0,40 delay=100 time=200 conditional=true')]) - count += 1 - self.max_movies += 1 - xbmc.sleep(120) - i += 1 - xbmc.sleep(300) - except: - pass - - elif control == self.btn_left: - try: - i = 1 - count = 0 - for photo, title in self.max_movies_buttons: - stay = max_poster + (self.max_movies % max_poster) - if stay == max_poster: - stay = max_poster * 2 - stay2 = self.max_movies % max_poster - if not stay2: - stay2 = max_poster - if i > lself.max_movies - stay and count < max_poster: - self.addControl(photo) - photo.setAnimations([('focus', 'effect=slide start=0,0 end=0,-260 time=200'),('unfocus', 'effect=slide start=-0,-260 end=0,0 time=200'),('WindowOpen', 'effect=slide start=0,40 end=0,0 delay=100 time=200 conditional=true'),('WindowClose', 'effect=slide start=0,0 end=0,40 delay=100 time=200 conditional=true')]) - count += 1 - elif i > self.max_movies - stay2 and i <= self.max_movies and count < max_poster * 2: - self.removeControls([photo]) - count += 1 - self.max_movies -= 1 - i += 1 - except: - pass - - else: - for button, title, id, poster in self.idps: - logger.info('INFOS',button, title, id, poster) - if control == button: - new_item=self.item.clone(title=title, infoLabels={'tmdb_id':id}, contentType=self.item.contentType) - self.close() - start(new_item, from_window=True) - - -class Search(xbmcgui.WindowXMLDialog): - def __init__(self, *args, **kwargs): - self.list = kwargs.get("itemlist") - self.item = kwargs.get("item") + self.items = [] + self.cast = [] + self.ids = {} def onInit(self): - try: - self.control_list = self.getControl(6) - self.getControl(5).setNavigation(self.control_list, self.control_list, self.control_list, self.control_list) - self.getControl(3).setEnabled(0) - self.getControl(3).setVisible(0) - except: - pass - self.getControl(1).setLabel(config.get_localized_string(60498)) - - self.getControl(5).setLabel(config.get_localized_string(60495)) - self.control_list.reset() - items = [] - for item_l in self.list: - item = xbmcgui.ListItem(item_l.title) - try: item.setArt({"thumb": item_l.thumbnail}) - except: item.setThumbnailImage(item_l.thumbnail) - item.setProperty("item_copy", item_l.tourl()) - items.append(item) - - self.getControl(6).addItems(items) - self.setFocusId(6) - - def onAction(self, action): - global SearchWindow - if (action == ACTION_SELECT_ITEM or action == 100) and self.getFocusId() == 6: - dialog = platformtools.dialog_progress_bg(config.get_localized_string(60496), config.get_localized_string(60497)) - selectitem = self.getControl(6).getSelectedItem() - item = Item().fromurl(selectitem.getProperty("item_copy")) - channel = __import__('channels.%s' % item.channel, fromlist=["channels.%s" % item.channel]) - itemlist = getattr(channel, item.action)(item) - global SearchWindows - window = GlobalSearch('DialogSelect.xml', config.get_runtime_path(), itemlist=itemlist, dialog=dialog) - SearchWindows.append(window) - self.close() - window.doModal() - - if (action == ACTION_SELECT_ITEM or action == 100) and self.getFocusId() in [5,7]: self.close() - elif action == ACTION_PREVIOUS_MENU or action == ACTION_GESTURE_SWIPE_LEFT or action == 110 or action == 92: self.close() - - -class GlobalSearch(xbmcgui.WindowXMLDialog): - def __init__(self, *args, **kwargs): - self.lista = kwargs.get("itemlist") - self.dialog = kwargs.get("dialog") - - def onInit(self): - self.dialog.close() - try: - self.control_list = self.getControl(6) - self.getControl(5).setNavigation(self.control_list, self.control_list, self.control_list, self.control_list) - self.getControl(3).setEnabled(0) - self.getControl(3).setVisible(0) - except: - pass - - self.getControl(1).setLabel(config.get_localized_string(60498)) - self.getControl(5).setLabel(config.get_localized_string(60495)) - self.control_list.reset() - if not self.lista: - global SearchWindows - self.close() - SearchWindows.pop() - if len(SearchWindows) - 1 >= 0: - SearchWindows[-1].doModal() - else: - SearchWindow.doModal() - else: - items = [] - for item_l in self.lista: - item = xbmcgui.ListItem(item_l.title) - try: - item.setArt({"thumb": item_l.thumbnail}) - except: - item.setThumbnailImage(item_l.thumbnail) - item.setProperty("item_copy", item_l.tourl()) - items.append(item) - self.getControl(6).addItems(items) - self.setFocusId(6) - - def onAction(self, action): - global SearchWindows - if (action == ACTION_SELECT_ITEM or action == 100) and self.getFocusId() == 6: - selectitem = self.getControl(6).getSelectedItem() - item = Item().fromurl(selectitem.getProperty("item_copy")) - channel = __import__('channels.%s' % item.channel, fromlist=["channels.%s" % item.channel]) - ventana_error = None - if item.action == "play": - if hasattr(channel, 'play'): - itemlist = channel.play(item) - if len(itemlist) > 0: - item = itemlist[0] - else: - ventana_error = xbmcgui.Dialog() - ok = ventana_error.ok("plugin", config.get_localized_string(60500)) - return - - global SearchWindow, exit_loop, mainWindow, ActorInfoWindow, relatedWindow, ActorsWindow - borrar = [relatedWindow, ActorInfoWindow, ActorsWindow, SearchWindow] - - borrar.extend(SearchWindows) - borrar.extend(mainWindow) - if item.server != "torrent": - import time - check = False - time_start = time.time() - try: platformtools.play_video(item) - except: check = True - xbmc.sleep(1500) - if not check and xbmc.Player().isPlaying(): - exit_loop = True - for window in borrar: - try: window.close() - except: pass - while True: - xbmc.sleep(1000) - if not xbmc.Player().isPlaying(): break - if time.time() - time_start > 120: return - - for window in SearchWindows: window.doModal() - SearchWindow.doModal() - mainWindow[-1].doModal() - - elif item.server == "torrent": - exit_loop = True - for window in borrar: - try: - window.close() - del window - except: - pass - platformtools.play_video(item) - - else: - try: - dialog = platformtools.dialog_progress_bg(config.get_localized_string(60496), config.get_localized_string(60497)) - itemlist = getattr(channel, item.action)(item) - window = GlobalSearch('DialogSelect.xml', config.get_runtime_path(), itemlist=itemlist, dialog=dialog) - SearchWindows.append(window) - self.close() - window.doModal() - except: - pass - - elif (action == ACTION_SELECT_ITEM or action == 100) and self.getFocusId() in [5,7]: - self.close() - SearchWindows.pop() - if len(SearchWindows) - 1 >= 0: SearchWindows[-1].doModal() - else: SearchWindow.doModal() - - elif action == ACTION_PREVIOUS_MENU or action == ACTION_GESTURE_SWIPE_LEFT or action == 110 or action == 92: - self.close() - SearchWindows.pop() - if len(SearchWindows) - 1 >= 0: SearchWindows[-1].doModal() - else: SearchWindow.doModal() - - -def globalSearch(item, infoLabels, org_title=False): - logger.info() - if item.contentType == "movie": cat = ["movie"] - else: cat = ["serie"] - cat += ["infoPlus"] - new_item = Item(title=item.contentTitle, text=item.contentTitle, mode=item.contentType, infoLabels=item.infoLabels) - from specials import search - return search.channel_search(new_item) - - -class Actors(xbmcgui.WindowXMLDialog): - def __init__(self, *args, **kwargs): - self.tmdb_id = kwargs.get("tmdb_id") - self.item = kwargs.get("item") - self.fonts = kwargs.get("fonts") - - def onInit(self): - try: - self.control_list = self.getControl(6) - self.getControl(5).setNavigation(self.control_list, self.control_list, self.control_list, self.control_list) - self.getControl(3).setEnabled(0) - self.getControl(3).setVisible(0) - except: - pass - self.getControl(1).setLabel(config.get_localized_string(60501)) - self.getControl(5).setLabel(config.get_localized_string(60495)) - self.control_list.reset() - items = [] - - Type = self.item.contentType - if Type != "movie": Type = "tv" - otmdb = tmdb.Tmdb(id_Tmdb=self.tmdb_id, tipo=Type) - actors = otmdb.result.get("credits", {}).get("cast", []) - - if self.item.contentType == "movie": cast = otmdb.result.get("credits", {}).get("crew", []) - else: cast = otmdb.result.get("created_by", []) - - for crew in cast: - if crew.get('job', '') == 'Director' or self.item.contentType != "movie": actors.insert(0, crew) - - for actor in actors: - name_info = typo(actor["name"], 'bold') - try: - name = "%s (%s)" % (actor["name"], actor["character"]) - job = "actor" - except: - job = "Director" - name = "%s (%s)" % (actor["name"], job) - image = "https://image.tmdb.org/t/p/original" - if actor["profile_path"]: image += actor["profile_path"] - else: image = imagepath('no_photo') - item = xbmcgui.ListItem(name) - try: - item.setArt({"thumb": image}) - except: - item.setThumbnailImage(image) - item.setProperty("id_actor", str(actor["id"])) - item.setProperty("name_info", name_info) - item.setProperty("thumbnail", image) - item.setProperty("job", job) - items.append(item) - - self.getControl(6).addItems(items) - self.setFocusId(6) - - def onAction(self, action): - if (action == ACTION_SELECT_ITEM or action == 100) and self.getFocusId() == 6: - selectitem = self.getControl(6).getSelectedItem() - id_actor = selectitem.getProperty("id_actor") - name_info = selectitem.getProperty("name_info") - thumbnail = selectitem.getProperty("thumbnail") - job = selectitem.getProperty("job") - dialog = platformtools.dialog_progress(config.get_localized_string(60502), config.get_localized_string(60503) % job.lower()) - - global ActorInfoWindow - ActorInfoWindow = ActorInfo(id=id_actor, name=name_info, thumbnail=thumbnail, item=self.item, fonts=self.fonts, dialog=dialog, job=job) - ActorInfoWindow.doModal() - xbmc.sleep(400) - elif (action == ACTION_SELECT_ITEM or action == 100) and self.getFocusId() == [5,7]: self.close() - elif action == ACTION_PREVIOUS_MENU or action == ACTION_GESTURE_SWIPE_LEFT or action == 110 or action == 92: self.close() - -class ActorInfo(xbmcgui.WindowDialog): - def __init__(self, *args, **kwargs): - global exit_loop - if exit_loop: exit_loop = False - self.id = kwargs.get('id') - self.nombre = kwargs.get('name') - self.thumbnail = kwargs.get('thumbnail') - self.item = kwargs.get('item') - self.fonts = kwargs.get('fonts') - self.job = kwargs.get('job') - - self.dialog = kwargs.get('dialog') - if self.item.contentType == "movie": - Type = "movie" - search = {'url': 'person/%s' % self.id, 'language': def_lang, 'append_to_response': 'movie_credits,images'} - else: - Type = "tv" - search = {'url': 'person/%s' % self.id, 'language': def_lang, 'append_to_response': 'tv_credits,images'} - - actor_tmdb = tmdb.Tmdb(discover=search) - if not actor_tmdb.result.get("biography") and actor_tmdb.result.get("imdb_id"): - data = httptools.downloadpage("http://www.imdb.com/name/%s/bio" % actor_tmdb.result["imdb_id"]).data - info = scrapertools.find_single_match(data, r'<div class="soda odd">.*?<p>(.*?)</p>') - if info: - bio = dhe(scrapertools.htmlclean(info.strip())) - actor_tmdb.result["biography"] = bio - else: - actor_tmdb.result["biography"] = config.get_localized_string(60504) - elif not actor_tmdb.result.get("biography"): - actor_tmdb.result["biography"] = config.get_localized_string(60504) - - #### Kodi 18 Compatibility #### + #### Compatibility with Kodi 18 #### if config.get_platform(True)['num_version'] < 18: self.setCoordinateResolution(2) - - self.background = xbmcgui.ControlImage(0, 0, 1280, 720, imagepath('white'), colorDiffuse='FF232323') - self.addControl(self.background) - - # TITLE - self.title = xbmcgui.ControlTextBox(40, 40, 750, 30, font=self.fonts["30"]) - self.addControl(self.title) - self.title.setAnimations([('WindowOpen', 'effect=slide start=-750,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-750,0 delay=100 time=200')]) - self.title.setText(self.nombre) - - # ACTOR INFO (PLOT) - self.info_actor = xbmcgui.ControlTextBox(40, 140, 760, 460, font=self.fonts["24"]) - self.addControl(self.info_actor) - self.info_actor.setAnimations([('WindowOpen', 'effect=slide start=-750,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=-750,0 delay=100 time=200')]) - try: self.info_actor.autoScroll(10000, 2000, 30000) - except: xbmc.executebuiltin( config.get_localized_string(70500)) - self.info_actor.setText(typo(actor_tmdb.result.get("biography", config.get_localized_string(60504)),'bold')) - - # POSTER - self.thumbnail = xbmcgui.ControlImage(880, 40, 400, 600, self.thumbnail) - self.addControl(self.thumbnail) - self.thumbnail.setAnimations([('WindowOpen', 'effect=slide start=+400,0 end=0,0 delay=100 time=200'), ('WindowClose', 'effect=slide start=0,0 end=+400,0 delay=100 time=200')]) - xbmc.sleep(300) - - # Movies - self.Titles = [] - search_type = "cast" - if self.job != "actor": search_type = "crew" - ids = [] - for entradas in actor_tmdb.result.get("%s_credits" % Type, {}).get(search_type, []): - if entradas["id"] not in ids and entradas["poster_path"]: - ids.append(entradas["id"]) - thumbnail = "https://image.tmdb.org/t/p/original" - thumbnail += entradas["poster_path"] - if self.item.contentType == "movie": self.Titles.append([entradas["id"], entradas.get("title", entradas.get("original_title", "")), thumbnail]) - else: self.Titles.append([entradas["id"], entradas.get("title", entradas.get("original_title", "")), thumbnail]) - - self.dialog.update(40, config.get_localized_string(60505)) - self.max_movies = max_poster - self.idps = [] - self.buttons = [] - self.max_movies_buttons = [] - self.focus = 0 - i = 0 - count = 0 - self.btn_left = xbmcgui.ControlButton(0, 680, 40, 40, '', imagepath('previous_focus'), imagepath('previous_no_focus')) - self.addControl(self.btn_left) - self.buttons.append(self.btn_left) - for idp, title, photo in self.Titles: - if count % max_poster == 0: i = 0 - self.image = xbmcgui.ControlButton(40 + i, 420 + 260, 200, 300, '', photo, photo) - self.buttons.append(self.image) - if count < max_poster: - self.addControl(self.image) - self.image.setAnimations([('focus', 'effect=slide start=0,0 end=0,-260 time=200'),('unfocus', 'effect=slide start=-0,-260 end=0,0 time=200'),('WindowOpen', 'effect=slide start=0,40 end=0,0 delay=100 time=200 conditional=true'),('WindowClose', 'effect=slide start=0,0 end=0,40 delay=100 time=200 conditional=true')]) - self.idps.append([self.image, title, idp, photo]) - self.max_movies_buttons.append([self.image, title]) - i += 200 - count += 1 - xbmc.sleep(200) - - self.btn_right = xbmcgui.ControlButton(1240, 680, 40, 40, '', imagepath('next_focus'), imagepath('next_no_focus')) - self.addControl(self.btn_right) - self.buttons.append(self.btn_right) - xbmc.sleep(200) - self.dialog.close() - - - def onAction(self, action): - global exit_loop - if exit_loop: - exit_loop = False - - if action == ACTION_MOVE_RIGHT: - if self.getFocusId() not in [3012]: - if self.focus < len(self.buttons) - 1: - self.focus += 1 - while True: - id_focus = str(self.buttons[self.focus].getId()) - if xbmc.getCondVisibility('[Control.IsVisible(' + id_focus + ')]'): - self.setFocus(self.buttons[self.focus]) - break - self.focus += 1 - if self.focus == len(self.buttons): - break - elif self.getFocusId() in [3012]: - self.focus = 0 - self.setFocus(self.btn_left) - - if action == ACTION_MOVE_LEFT: - if self.getFocusId() not in [3005]: - if self.focus > 0: - self.focus -= 1 - while True: - id_focus = str(self.buttons[self.focus].getId()) - if xbmc.getCondVisibility('[Control.IsVisible(' + id_focus + ')]'): - self.setFocus(self.buttons[self.focus]) - break - self.focus -= 1 - if self.focus == len(self.buttons): - break - elif self.getFocusId() in [3005]: - self.focus = len(self.buttons) - 1 - self.setFocus(self.btn_right) - - if action == ACTION_PREVIOUS_MENU or action == ACTION_GESTURE_SWIPE_LEFT or action == 110 or action == 92: - exit_loop = True - self.close() - - if action == 105 or action == 6: - for button, title, id, poster in self.idps: - try: - if self.getFocusId() == button.getId() and self.btn_right: - self.focus = len(self.buttons) - 1 - xbmc.executebuiltin('SendClick(%s)' % self.btn_right.getId()) - except: - pass - - if action == 104 or action == 5: - for button, title, id, poster in self.idps: - try: - if self.getFocusId() == button.getId() and self.btn_left: - self.setFocus(self.btn_left) - xbmc.executebuiltin('SendClick(%s)' % self.btn_left.getId()) - except: - pass - - def onControl(self, control): - if control == self.btn_right: - try: - i = 1 - count = 0 - for photo, title in self.max_movies_buttons: - if i > self.max_movies - max_poster and i <= self.max_movies and count < max_poster: - self.removeControls([photo]) - count += 1 - elif i > self.max_movies and count < max_poster * 2: - self.addControl(photo) - photo.setAnimations([('focus', 'effect=slide start=0,0 end=0,-260 time=200'),('unfocus', 'effect=slide start=-0,-260 end=0,0 time=200'),('WindowOpen', 'effect=slide start=0,40 end=0,0 delay=100 time=200 conditional=true'),('WindowClose', 'effect=slide start=0,0 end=0,40 delay=100 time=200 conditional=true')]) - count += 1 - self.max_movies += 1 - xbmc.sleep(120) - i += 1 - xbmc.sleep(300) - except: - pass - elif control == self.btn_left: - try: - i = 1 - count = 0 - for photo, title in self.max_movies_buttons: - stay = max_poster + (self.max_movies % max_poster) - if stay == max_poster: - stay = max_poster * 2 - stay2 = self.max_movies % max_poster - if not stay2: - stay2 = max_poster - if i > self.max_movies - stay and count < max_poster: - self.addControl(photo) - photo.setAnimations([('focus', 'effect=slide start=0,0 end=0,-260 time=200'),('unfocus', 'effect=slide start=-0,-260 end=0,0 time=200'),('WindowOpen', 'effect=slide start=0,40 end=0,0 delay=100 time=200 conditional=true'),('WindowClose', 'effect=slide start=0,0 end=0,40 delay=100 time=200 conditional=true')]) - count += 1 - elif i > self.max_movies - stay2 and i <= self.max_movies and count < max_poster * 2: - self.removeControls([photo]) - count += 1 - self.max_movies -= 1 - i += 1 - if self.max_movies == max_poster: - self.btn_left.setVisible(False) - except: - pass - + if Info.getProperty('id'): + for item in get_movies(Info): + self.items.append(item) else: - for button, title, id, poster in self.idps: - if control == button: - new_item = self.item.clone(title=title,infoLabels={'tmdb_id':id}) - self.close() - start(new_item, from_window=True) + for item in get_recomendations(Info): + self.items.append(item) + for i, item in enumerate(get_cast(Info)): + if i == 0: actors_more_info(item) + self.cast.append(item) + self.getControl(LOADING).setVisible(False) + self.getControl(RECOMANDED).addItems(self.items) + self.getControl(FANART).setImage(Info.getProperty('fanart')) + self.getControl(CAST).addItems(self.cast) + if Info.getProperty('rating'): + self.getControl(RATING).setText(str(Info.getProperty('rating'))) + getFocus(self) - -class images(xbmcgui.WindowDialog): - def __init__(self, *args, **kwargs): - self.tmdb = kwargs.get("tmdb", {}) - - self.image_list = [] - - for key, value in self.tmdb.items(): - for detail in value: self.image_list.append('http://image.tmdb.org/t/p/original' + detail["file_path"]) - # for image in self.imdb: self.image_list.append(image["src"]) - # for image, title in self.mal: self.image_list.append(image) - - #### Kodi 18 Compatibility #### - if config.get_platform(True)['num_version'] < 18: self.setCoordinateResolution(2) - - self.background = xbmcgui.ControlImage(0, 0, 1280, 720, imagepath('white'), colorDiffuse='CC232323') - self.addControl(self.background) - main_image = self.image_list[0] if self.image_list else '' - self.main_image = xbmcgui.ControlImage(0, 0, 1280, 720, main_image, 2) - self.addControl(self.main_image) - - # BUTTON LEFT - self.btn_left = xbmcgui.ControlButton(0, 300, 60, 60, '', imagepath('previous_focus'), imagepath('previous_no_focus')) - self.addControl(self.btn_left) - self.btn_left.setAnimations([('WindowOpen', 'effect=slide start=-60,0 end=0,0 delay=100 time=200'),('WindowClose', 'effect=slide start=0,0 end=-60,0 delay=100 time=200')]) - - # BUTTON RIGHT - self.btn_right = xbmcgui.ControlButton(1220, 300, 60, 60, '', imagepath('next_focus'), imagepath('next_no_focus')) - self.addControl(self.btn_right) - self.btn_right.setAnimations([('WindowOpen', 'effect=slide start=60,0 end=0,0 delay=100 time=200'),('WindowClose', 'effect=slide start=0,0 end=60,0 delay=100 time=200')]) - - self.count = 0 + def onClick(self, control_id): + setFocus(self) + if control_id in [SEARCH]: + title = self.getControl(RECOMANDED).getSelectedItem().getProperty('title') + mode = self.getControl(RECOMANDED).getSelectedItem().getProperty('mediatype') + action = 'search' + # if title == Info.getProperty('title'): action = 'global_search' + # else: action = 'search' + self.close() + if self.getControl(RECOMANDED).getSelectedPosition() > 0: + Search(ITEM.clone(action=action, search_text=title)) + else: + Search(ITEM.clone(action=action, search_text=title, mode=mode)) + elif control_id in [TRAILER]: + info = self.getControl(RECOMANDED).getSelectedItem() + self.close() + Trailer(info) + elif control_id in [CAST]: + self.close() + Main(self.getControl(CAST).getSelectedItem()) + elif control_id in [BTN_NEXT]: + self.setFocusId(CAST) + elif control_id in [BTN_PREV]: + self.setFocusId(RECOMANDED) + elif control_id in [RECOMANDED]: + self.close() + Main(self.getControl(RECOMANDED).getSelectedItem()) def onAction(self, action): - if action == ACTION_PREVIOUS_MENU or action == ACTION_GESTURE_SWIPE_LEFT or action == 110 or action == 92: + if self.getFocusId() in [CAST, RECOMANDED]: + self.ids[self.getFocusId()] = self.getControl(self.getFocusId()).getSelectedPosition() + if self.getFocusId() in [CAST] and action not in [BACKSPACE, EXIT, UP, DOWN]: + actors_more_info(self.getControl(self.getFocusId()).getSelectedItem()) + if self.getFocusId() in [RECOMANDED]: + fanart = self.getControl(self.getFocusId()).getSelectedItem().getProperty('fanart') + rating = self.getControl(self.getFocusId()).getSelectedItem().getProperty('rating') + if not rating: rating = 'N/A' + self.getControl(FANART).setImage(fanart) + self.getControl(RATING).setText(rating) + if self.getFocus() > 0: + cast = [] + self.getControl(CAST).reset() + for actor in get_cast(self.getControl(self.getFocusId()).getSelectedItem()): + cast.append(actor) + self.getControl(CAST).addItems(cast) + action = action.getId() + if action in [BACKSPACE]: + self.close() + remove() + modal() + elif action in [EXIT]: self.close() - if action == ACTION_MOVE_RIGHT or action == ACTION_MOVE_DOWN: - self.count += 1 - if self.count > len(self.image_list) -1: self.count = 0 - self.main_image.setImage(self.image_list[self.count]) - if action == ACTION_MOVE_LEFT or action == ACTION_MOVE_UP: - self.count -= 1 - if self.count < 0: self.count = len(self.image_list) -1 - self.main_image.setImage(self.image_list[self.count]) +def Search(item): + if item.action == 'findvideos': XML = 'ServersWindow.xml' + else: XML = 'SearchWindow.xml' + global Info + Info = item + main = SearchWindow(XML, config.get_runtime_path()) + add({'class':main, 'info':item, 'id':RECOMANDED}) + modal() - - def onControl(self, control): - if control == self.btn_right: - self.count += 1 - if self.count > len(self.image_list) -1: self.count = 0 - self.main_image.setImage(self.image_list[self.count]) - - if control == self.btn_left: - self.count -= 1 - if self.count < 0: self.count = len(self.image_list) -1 - self.main_image.setImage(self.image_list[self.count]) - - -class Trailer(xbmcgui.WindowXMLDialog): - def Start(self, item, trailers): - self.item = item - from specials import trailertools - self.video_url, self.windows = trailertools.buscartrailer(self.item.clone(), trailers=trailers) - self.doModal() +class SearchWindow(xbmcgui.WindowXMLDialog): + def __init__(self, *args, **kwargs): + self.items = [] + self.itemlist = [] + self.commands = [] + self.ids = {} + self.channel = None def onInit(self): - #### Kodi 18 Compatibility#### - if config.get_platform(True)['num_version'] < 18: self.setCoordinateResolution(0) + #### Compatibility with Kodi 18 #### + if config.get_platform(True)['num_version'] < 18: + self.setCoordinateResolution(2) + if not self.items: + if Info.action == 'search' and Info.mode: + from specials.search import new_search + itemlist = new_search(Info) + elif Info.action == 'channel_search': + from specials.search import channel_search + itemlist = channel_search(Info) + else: + self.channel = __import__('channels.%s' % Info.channel, fromlist=["channels.%s" % Info.channel]) + if Info.action == 'search': itemlist = getattr(self.channel, 'search')(Info, Info.search_text) + else: itemlist = getattr(self.channel, Info.action)(Info) + if not itemlist: + if platformtools.dialog_yesno(config.get_localized_string(60473), config.get_localized_string(70820) % Info.channel): + remove() + self.close() + return Search(Info.clone(mode=Info.infoLabels['mediatype'])) + else: + remove() + self.close() + modal() + for item in itemlist: + if item.action not in ['save_download', 'add_pelicula_to_library', 'add_serie_to_library', ''] and item.infoLabels['title']: + if item.action == 'findvideos' and item.contentType in ['episode', 'tvshow']: + it = xbmcgui.ListItem(re.sub(r'\[[^\]]+\]', '', item.title)) + else: + it = xbmcgui.ListItem(item.infoLabels['title']) + it.setProperty('channel', item.channel) + it.setProperty('action', item.action) + it.setProperty('server', item.server) + it.setProperty('url', item.url) + for key, value in item.infoLabels.items(): + it.setProperty(key, str(value)) + if item.action == 'play': + it.setProperty('thumbnail', "https://raw.githubusercontent.com/kodiondemand/media/master/resources/servers/%s.png" % item.server.lower()) + self.items.append(it) + self.itemlist.append(item) + if itemlist[0].contentType == 'movie': + if not itemlist[0].server: + self.commands.append(itemlist[0].clone(action='add_pelicula_to_library', thumbnail=support.thumb('add_to_videolibrary'))) + self.commands.append(itemlist[0].clone(channel='downloads', action='save_download', from_channel=itemlist[0].channel, from_action=itemlist[0].action, thumbnail=support.thumb('downloads'))) + else: + self.commands.append(Info.clone(channel='downloads', action='save_download', from_channel=Info.channel, from_action=Info.action, thumbnail=support.thumb('downloads'))) + if itemlist[0].contentType in ['tvshow', 'episode']: + if not itemlist[0].server: + self.commands.append(itemlist[0].clone(action='add_serie_to_library', thumbnail=support.thumb('add_to_videolibrary'))) + self.commands.append(itemlist[0].clone(channel='downloads', action='save_download', from_channel=itemlist[0].channel, from_action=itemlist[0].action, thumbnail=support.thumb('downloads'))) + else: + self.commands.append(Info.clone(channel='downloads', action='save_download', from_channel=Info.channel, from_action=Info.action, thumbnail=support.thumb('downloads'))) - if not self.video_url: - platformtools.dialog_notification(config.get_localized_string(60507), config.get_localized_string(60508), 2) - self.close() - elif self.video_url == "no_video": - self.close() + if self.commands: + commands = [] + for command in self.commands: + it = xbmcgui.ListItem(command.title) + path = filetools.join(config.get_runtime_path(),'resources','skins','Default','media','Infoplus',command.thumbnail.split('/')[-1].replace('thumb_','')) + it.setProperty('thumbnail',path) + commands.append(it) + self.getControl(COMMANDS).addItems(commands) + if self.items: + self.getControl(FANART).setImage(self.items[0].getProperty('fanart')) + + self.getControl(RECOMANDED).addItems(self.items) + self.getControl(LOADING).setVisible(False) + getFocus(self) + + def onClick(self, control_id): + setFocus(self) + if control_id == COMMANDS: + from platformcode.launcher import run + pos = self.getControl(COMMANDS).getSelectedPosition() + if self.commands[pos].action =='save_download' and self.commands[pos].contentType == 'tvshow': + actions = [self.commands[-1].clone(), self.commands[-1].clone(download='season')] + options = [config.get_localized_string(60355),config.get_localized_string(60357)] + run(actions[platformtools.dialog_select(config.get_localized_string(60498),options)]) + else: + run(self.commands[pos]) else: - new_video = False - while True: - if new_video: self.doModal() - xlistitem = xbmcgui.ListItem(path=self.video_url, thumbnailImage=self.item.thumbnail) - pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) - pl.clear() - pl.add(self.video_url, xlistitem) - self.player = xbmc.Player() - self.player.play(pl, windowed=True) - while xbmc.Player().isPlaying(): xbmc.sleep(1000) + action = self.getControl(RECOMANDED).getSelectedItem().getProperty('action') + channel = self.getControl(RECOMANDED).getSelectedItem().getProperty('channel') + url = self.getControl(RECOMANDED).getSelectedItem().getProperty('url') + item = Item(channel=channel, action=action, url=url) + if action == 'play': + item.server = self.getControl(RECOMANDED).getSelectedItem().getProperty('server') self.close() - self.video_url = None - new_video = True - self.windows[-1].doModal() - try: - self.video_url = self.windows[-1].result - if not self.video_url: break - except: - break + platformtools.play_video(item) + xbmc.sleep(500) + while xbmc.Player().isPlaying(): + xbmc.sleep(500) + modal() + elif config.get_setting('autoplay'): + item.quality = self.getControl(RECOMANDED).getSelectedItem().getProperty('quality') + getattr(self.channel, item.action)(item) + self.close() + xbmc.sleep(500) + while xbmc.Player().isPlaying(): + xbmc.sleep(500) + modal() + else: + pos = self.getControl(RECOMANDED).getSelectedPosition() + self.close() + if self.itemlist[pos].mode: remove() + Search(self.itemlist[pos]) def onAction(self, action): - if action == ACTION_PREVIOUS_MENU or action == ACTION_GESTURE_SWIPE_LEFT or action == 110 or action == 92: - self.player.stop() + if self.getFocusId() in [RECOMANDED]: + fanart = self.getControl(self.getFocusId()).getSelectedItem().getProperty('fanart') + self.getControl(FANART).setImage(fanart) + action = action.getId() + if action in [BACKSPACE]: + self.close() + remove() + modal() + elif action in [EXIT]: self.close() - elif action == ACTION_MOVE_LEFT: xbmc.executebuiltin('PlayerControl(Rewind)') - elif action == ACTION_MOVE_RIGHT: xbmc.executebuiltin('PlayerControl(Forward)') - elif action == ACTION_SELECT_ITEM: xbmc.executebuiltin('PlayerControl(Play)') - elif action == 199 or action == ACTION_SHOW_FULLSCREEN or action == 9: xbmc.log("tuprimalafachaaa") - if action == 13: self.close() - -def get_recomendations(item, infoLabels, recommendations): - Type = item.contentType +def Trailer(info): + global info_list, trailers + trailers = [] + trailers_list = [] + Type = info.getProperty('mediatype') if Type != "movie": Type = "tv" - search = {'url': '%s/%s/recommendations' % (Type, infoLabels['tmdb_id']), 'language': def_lang, 'page': 1} - reco_tmdb = tmdb.Tmdb(discover=search, tipo=Type, idioma_Search=def_lang) + trailers_list = tmdb.Tmdb(id_Tmdb=info.getProperty('tmdb_id'), tipo=Type).get_videos() + if trailers_list: + for i, trailer in enumerate(trailers_list): + item = xbmcgui.ListItem(trailer['name']) + item.setProperties({'tile':trailer['name'], + 'url': trailer['url'], + 'thumbnail': 'http://img.youtube.com/vi/' + trailer['url'].split('=')[-1] + '/0.jpg', + 'fanart':info.getProperty('fanart'), + 'position':'%s/%s' % (i + 1, len(trailers_list))}) + trailers.append(item) + else: # TRY youtube search + patron = r'thumbnails":\[\{"url":"(https://i.ytimg.com/vi[^"]+).*?' + patron += r'text":"([^"]+).*?' + patron += r'simpleText":"[^"]+.*?simpleText":"([^"]+).*?' + patron += r'url":"([^"]+)' + matches = support.match('https://www.youtube.com/results?search_query=' + info.getProperty('title').replace(' ','+') + '+trailer+ita', patron = patron).matches + i = 0 + for thumb, title, text, url in matches: + i += 1 + item = xbmcgui.ListItem(title + ' - '+ text) + item.setProperties({'tile':title + ' - '+ text, 'url': url, 'thumbnail': thumb, 'fanart':info.getProperty('fanart'), 'position':'%s/%s' % (i, len(matches))}) + trailers.append(item) + main = TrailerWindow('TrailerWindow.xml', config.get_runtime_path()) + add({'class':main, 'info':trailers, 'id':RECOMANDED, TRAILERS:0}) + modal() - for i in range(0, len(reco_tmdb.results)): - Title = reco_tmdb.results[i].get("title", reco_tmdb.results[i].get("original_title", "")) - if not Title: Title = reco_tmdb.results[i].get("name", reco_tmdb.results[i].get("original_name", "")) - idtmdb = str(reco_tmdb.results[i].get("id")) - thumbnail = reco_tmdb.results[i].get("poster_path", "") - if thumbnail: thumbnail = 'http://image.tmdb.org/t/p/original' + thumbnail - recommendations.append([idtmdb, Title, thumbnail]) +class TrailerWindow(xbmcgui.WindowXMLDialog): + def __init__(self, *args, **kwargs): + self.ids = {} + + def onInit(self): + #### Compatibility with Kodi 18 #### + if config.get_platform(True)['num_version'] < 18: + self.setCoordinateResolution(2) + self.getControl(FANART).setImage(trailers[0].getProperty('fanart')) + self.getControl(NUMBER).setText(trailers[0].getProperty('position')) + self.getControl(TRAILERS).addItems(trailers) + self.setFocusId(TRAILERS) + getFocus(self) + + def onClick(self, control_id): + setFocus(self) + if control_id in [TRAILERS]: + selected = self.getControl(TRAILERS).getSelectedItem() + platformtools.play_video(Item(title=selected.getProperty('title'), action='play', url=selected.getProperty('url'), server='youtube')) + while not xbmc.Player().isPlaying(): + xbmc.sleep(100) + self.close() + while xbmc.Player().isPlaying(): + xbmc.sleep(100) + modal() + + def onAction(self, action): + if self.getFocusId() in [TRAILERS]: + self.ids[self.getFocusId()] = self.getControl(self.getFocusId()).getSelectedPosition() + fanart = self.getControl(TRAILERS).getSelectedItem().getProperty('fanart') + position = self.getControl(TRAILERS).getSelectedItem().getProperty('position') + self.getControl(FANART).setImage(fanart) + self.getControl(NUMBER).setText(position) + action = action.getId() + global info_list + if action in [BACKSPACE]: + self.close() + remove() + modal() + elif action in [EXIT]: + self.close() -def get_fonts(skin): - data_font = "" - fonts = {} - if "confluence" in skin or "estuary" in skin or "refocus" in skin: fonts = {"10": "font10", "12": "font12", "16": "font16", "24": "font24_title", "30": "font30"} - elif "aeonmq" in skin: fonts = {"10": "font_14", "12": "font_16", "16": "font_20", "24": "font_24", "30": "font_30"} - elif "madnox" in skin: fonts = {"10": "Font_Reg22", "12": "Font_Reg26", "16": "Font_Reg32", "24": "Font_Reg38", "30": "Font_ShowcaseMainLabel2_Caps"} +def get_recomendations(info): + recommendations = [info] + Type = info.getProperty('mediatype') + if Type != "movie": Type = "tv" + search = {'url': '%s/%s/recommendations' % (Type, info.getProperty('tmdb_id')), 'language': 'it', 'page': 1} + tmdb_res = tmdb.Tmdb(discover=search, tipo=Type, idioma_Search='it').results + for result in tmdb_res: + if Type == 'movie': + title = result.get("title", '') + original_title = result.get("original_title", "") + else: + title = result.get("name", '') + original_title = result.get("original_name", '') + thumbnail ='http://image.tmdb.org/t/p/w342' + result.get("poster_path", "") if result.get("poster_path", "") else imagepath(Type) + fanart = 'http://image.tmdb.org/t/p/original' + result.get("backdrop_path", "") if result.get("backdrop_path", "") else '' + item = xbmcgui.ListItem(title) + item.setProperties({'title': title, + 'original_title': original_title, + 'mediatype': info.getProperty('mediatype'), + 'tmdb_id': result.get('id', 0), + 'imdb_id': info.getProperty('imdb_id'), + 'rating': result.get('vote_average', 0), + 'plot': result.get('overview', ''), + 'year': result.get('release_date', '').split('-')[0], + 'thumbnail': thumbnail, + 'fanart': fanart}) + recommendations.append(item) + return recommendations - if not fonts: - from core import filetools - try: - data_font = filetools.read(xbmc.translatePath(filetools.join('special://skin/1080i', 'Font.xml')), "r") - except: - try: data_font = filetools.read(xbmc.translatePath(filetools.join('special://skin/720p', 'Font.xml')), "r") - except: pass - - if data_font: - fuentes = scrapertools.find_multiple_matches(data_font, r"<name>([^<]+)<\/name>(?:<![^<]+>|)\s*<filename>[^<]+<\/filename>\s*<size>(\d+)<\/size>") - sizes = [] - try: - for name, size in fuentes: - size = int(size) - sizes.append([size, name]) - sizes.sort() - fonts["10"] = sizes[0][1].lower() - check = False - if not 12 in sizes: - for size, name in sizes: - if size != fonts["10"]: - fonts["12"] = name.lower() - check = True - break - for size, name in sizes: - if size == 12 and not check: fonts["12"] = name.lower() - elif size == 16: - fonts["16"] = name.lower() - elif size == 24: - fonts["24"] = name.lower() - elif size == 30: - fonts["30"] = name.lower() - break - elif size > 30 and size <= 33: - fonts["30"] = name.lower() - break - except: - pass - if not fonts: - fonts = {"10": "font10", "12": "font12", "16": "font16", "24": "font24", "30": "font30"} - - return fonts +def get_cast(info): + actors_list = [] + Type = "movie" if info.getProperty('mediatype') == 'movie' else 'tv' + otmdb = tmdb.Tmdb(id_Tmdb=info.getProperty('tmdb_id'), tipo=Type) + actors = otmdb.result.get("credits", {}).get("cast", []) + cast = otmdb.result.get("credits", {}).get("crew", []) if Type == 'movie' else otmdb.result.get("created_by", []) + for crew in cast: + if crew.get('job', '') == 'Director' or Type != "movie": actors.insert(0, crew) + for actor in actors: + res = xbmcgui.ListItem(actor.get('name', '')) + res.setProperties({'title': actor.get('name', ''), + 'job': actor.get('job', '') if actor.get('job', '') else actor.get('character',''), + 'thumbnail': "https://image.tmdb.org/t/p/w342" + actor.get('profile_path', '') if actor.get('profile_path', '') else imagepath('no_photo'), + 'type': Type, + 'id': actor.get('id', ''), + 'mediatype': info.getProperty('mediatype')}) + actors_list.append(res) + return actors_list def imagepath(image): if len(image.split('.')) == 1: image += '.png' path = filetools.join(config.get_runtime_path(), 'resources', 'skins' , 'Default', 'media', 'Infoplus', image) return path +def actors_more_info(ListItem): + api = 'k_0tdb8a8y' + Type = ListItem.getProperty('type') + actor_id = ListItem.getProperty('id') + more = tmdb.Tmdb(discover={'url': 'person/' + str(actor_id), 'language': 'it', 'append_to_response': Type + '_credits'}).results + imdb = requests.get('https://imdb-api.com/it/API/Name/%s/%s' % (api, more['imdb_id'])).json() + ListItem.setProperty('bio', imdb['summary']) -def search_type(self, channel=''): - if channel: - try: - channel = self.item.from_channel - if not channel: channel = self.item.channel - channel_obj = __import__('channels.%s' % channel, None, None, ["channels.%s" % channel]) - itemlist = channel_obj.search(self.item.clone(channel=channel), self.infoLabels.get("title")) - if not itemlist and self.infoLabels.get("originaltitle"): itemlist = channel_obj.search(self.item.clone(), self.infoLabels.get("originaltitle", "")) - except: - import traceback - logger.error(traceback.format_exc()) - else: - itemlist = globalSearch(self.item, self.infoLabels) - if len(itemlist) == 0 and self.infoLabels.get("originaltitle"): - itemlist = globalSearch(self.item, self.infoLabels, org_title=True) - return itemlist \ No newline at end of file + +def get_movies(info): + Type = info.getProperty('mediatype') if info.getProperty('mediatype') == 'movie' else 'tv' + more = tmdb.Tmdb(discover={'url': 'person/' + str(info.getProperty('id')), 'language': 'it', 'append_to_response': Type + '_credits'}).results + movies = [] + for movie in more.get(Type + '_credits', {}).get('cast',[]) + more.get(Type + '_credits', {}).get('crew',[]): + ret = {} + ret['mediatype'] = info.getProperty('mediatype') + thumbnail = movie.get('poster_path','') + ret['thumbnail'] = "https://image.tmdb.org/t/p/w342" + thumbnail if thumbnail else imagepath(Type) + ret['title'] = movie.get('title','') if Type == 'movie' else movie.get('name','') + ret['original_title'] = movie.get('original_title','') if Type == 'movie' else movie.get("original_name", '') + ret['tmdb_id'] = movie.get('id',0) + if ret not in movies: movies.append(ret) + itemlist = [] + with futures.ThreadPoolExecutor() as executor: + List = [executor.submit(add_infoLabels, movie) for movie in movies] + for res in futures.as_completed(List): + if res.result(): + itemlist.append(res.result()) + itemlist = sorted(itemlist, key=lambda it: (it.getProperty('year'),it.getProperty('title'))) + return itemlist + +def add_infoLabels(movie): + it = Item(title=movie['title'], infoLabels=movie, contentType=movie['mediatype']) + tmdb.set_infoLabels_item(it, True) + movie=it.infoLabels + item = xbmcgui.ListItem(movie['title']) + for key, value in movie.items(): + item.setProperty(key, str(value)) + return item + + +def add(Dict): + global info_list + info_list.append(Dict) + +def remove(): + global info_list + info_list = info_list[:-1] + +def modal(): + global Info + global info_list + if info_list: + Info = info_list[-1]['info'] + info_list[-1]['class'].doModal() + +def getFocus(self): + global info_list + for key, value in info_list[-1].items(): + if key not in ['class', 'info', 'id']: + self.getControl(int(key)).selectItem(value) + self.setFocusId(info_list[-1]['id']) + +def setFocus(self): + global info_list + info_list[-1]['id'] = self.getFocusId() + for key, values in self.ids.items(): + info_list[-1][key] = values \ No newline at end of file diff --git a/platformcode/launcher.py b/platformcode/launcher.py index 727ab0e8..135e790d 100644 --- a/platformcode/launcher.py +++ b/platformcode/launcher.py @@ -121,6 +121,14 @@ def run(item=None): else: return keymaptools.set_key() + elif item.channel == "infoplus": + from platformcode import infoplus + return infoplus.Main(item) + + elif item.channel == "shortcuts": + from platformcode import shortcuts + return getattr(shortcuts, item.action)(item) + elif item.action == "delete_key": from platformcode import keymaptools return keymaptools.delete_key() diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index e6391377..609d2615 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -421,7 +421,7 @@ def set_context_commands(item, item_url, parent_item, **kwargs): #if item.infoLabels['tmdb_id'] or item.infoLabels['imdb_id'] or item.infoLabels['tvdb_id'] or \ # (item.contentTitle and item.infoLabels["year"]) or item.contentSerieName: if item.infoLabels['tmdb_id'] or item.infoLabels['imdb_id'] or item.infoLabels['tvdb_id']: - context_commands.append(("InfoPlus", "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'channel=infoplus&action=start&from_channel=' + item.channel))) + context_commands.append(("InfoPlus", "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'channel=infoplus&action=Main&from_channel=' + item.channel))) # Go to the Main Menu (channel.mainlist) if parent_item.channel not in ["news", "channelselector", "downloads"] and item.action != "mainlist": diff --git a/platformcode/shortcuts.py b/platformcode/shortcuts.py index 0361bd0e..631d5896 100644 --- a/platformcode/shortcuts.py +++ b/platformcode/shortcuts.py @@ -12,12 +12,12 @@ def context(): # pre-serialised if config.get_setting('quick_menu'): context.append((config.get_localized_string(60360), 'RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJzaG9ydGN1dF9tZW51IiwgCiAgICAiY2hhbm5lbCI6ICJzaG9ydGN1dHMiLCAKICAgICJpbmZvTGFiZWxzIjoge30KfQ%3D%3D)')) - if config.get_setting('side_menu'): context.append((config.get_localized_string(70737), 'RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJzaWRlX21lbnUiLCAKICAgICJjaGFubmVsIjogInNob3J0Y3V0cyIsIAogICAgImluZm9MYWJlbHMiOiB7fQp9)')) + if config.get_setting('Side_menu'): context.append((config.get_localized_string(70737), 'RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJzaWRlX21lbnUiLCAKICAgICJjaGFubmVsIjogInNob3J0Y3V0cyIsIAogICAgImluZm9MYWJlbHMiOiB7fQp9)')) if config.get_setting('kod_menu'): context.append((config.get_localized_string(60026), 'RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJzZXR0aW5nc19tZW51IiwgCiAgICAiY2hhbm5lbCI6ICJzaG9ydGN1dHMiLCAKICAgICJpbmZvTGFiZWxzIjoge30KfQ%3D%3D)')) return context -def side_menu(item): +def Side_menu(item): side_menu.open_menu(item) def shortcut_menu(item): diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index a311c256..02cea72d 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -6082,6 +6082,10 @@ msgctxt "#70820" msgid "No results on channel %s, would you like to try Global Search?" msgstr "" +msgctxt "#70821" +msgid "Search results" +msgstr "" + # DNS start [ settings and declaration ] msgctxt "#707401" msgid "Enable DNS check alert" diff --git a/resources/language/resource.language.it_it/strings.po b/resources/language/resource.language.it_it/strings.po index 0f87180f..d0a6603e 100644 --- a/resources/language/resource.language.it_it/strings.po +++ b/resources/language/resource.language.it_it/strings.po @@ -6083,6 +6083,10 @@ msgctxt "#70820" msgid "No results on channel %s, would you like to try Global Search?" msgstr "Nessun risultato sul canale %s, vuoi provare con la Ricerca Globale?" +msgctxt "#70821" +msgid "Search results" +msgstr "Risultati della ricerca" + # DNS start [ settings and declaration ] msgctxt "#707401" msgid "Enable DNS check alert" diff --git a/resources/skins/Default/720p/InfoPlus.xml b/resources/skins/Default/720p/InfoPlus.xml new file mode 100644 index 00000000..e53fb1c5 --- /dev/null +++ b/resources/skins/Default/720p/InfoPlus.xml @@ -0,0 +1,266 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<window> + <depth>0.52</depth> + <coordinates> + <left>0</left> + <top>0</top> + </coordinates> + <controls> + <!-- CLOSE BUTTON / BACKGROUND --> + <control type="button"> + <left>0</left> + <top>0</top> + <width>100%</width> + <height>100%</height> + <texturefocus colordiffuse="FF232323">white.png</texturefocus> + <texturenofocus colordiffuse="FF232323">white.png</texturenofocus> + <animation effect="fade" time="200">WindowOpen</animation> + <animation effect="fade" time="200">WindowClose</animation> + <onclick>Action(close)</onclick> + </control> + <!-- GROUP CONTROLS --> + <control type="group"> + <left>0</left> + <top>0</top> + <animation type="WindowOpen" reversible="false"> + <effect type="slide" start="0,100" end="0,0" delay="160" time="160" /> + <effect type="fade" delay="160" end="100" time="100" /> + </animation> + <animation type="WindowClose" reversible="false"> + <effect type="slide" start="0,0" end="0,100" delay="160" time="160" /> + <effect type="fade" delay="160" start="100" end="0" time="100" /> + </animation> + + <!-- BACKGROUND --> + <control type="image" id='30000'> + <width>1280</width> + <height>720</height> + <texture colordiffuse="FF888888"></texture> + </control> + + <!-- LOADING --> + <control type="image" id='30011'> + <top>310</top> + <left>590</left> + <width>100</width> + <height>100</height> + <texture>Infoplus/loading.png</texture> + <animation effect="rotate" center="640,360" start="0" end="-360" time="5000" loop="true" condition="Control.IsVisible(30011)">Conditional</animation> + </control> + + <!-- PREVIOUS --> + <control type="button" id='30009'> + <left>0</left> + <bottom>0</bottom> + <width>1280</width> + <height>30</height> + <texturenofocus colordiffuse="00FFFFFF">white.png</texturenofocus> + <texturefocus colordiffuse="00FFFFFF">white.png</texturefocus> + <align>center</align> + </control> + + <!-- NEXT --> + <control type="button" id='30010'> + <left>0</left> + <top>0</top> + <width>1280</width> + <height>30</height> + <texturenofocus colordiffuse="00FFFFFF">white.png</texturenofocus> + <texturefocus colordiffuse="00FFFFFF">white.png</texturefocus> + <align>center</align> + </control> + + <control type="grouplist"> + <top>60</top> + <orientation>vertical</orientation> + <defaultcontrol>30500</defaultcontrol> + <width>1280</width> + <height>600</height> + <onup>30007</onup> + + <!-- RECOMMENDATIONS --> + <control type="wraplist" id="30500"> + <width>1280</width> + <height>600</height> + <viewtype>wrap</viewtype> + <orientation>horizontal</orientation> + <scrolltime tween="sine" easing="out">300</scrolltime> + <itemlayout height="600" width="220"> + <!-- Poster --> + <control type="image"> + <bottom>0</bottom> + <left>0</left> + <width>200</width> + <height>300</height> + <texture>$INFO[ListItem.Property(thumbnail)]</texture> + <aspectratio>scale</aspectratio> + </control> + </itemlayout> + <focusedlayout height="600" width="420"> + <!-- Title --> + <control type="textbox"> + <left>440</left> + <top>0</top> + <width>800</width> + <height>30</height> + <font>font30_title</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>[B]$INFO[ListItem.Label] [COLOR FFAAAAAA]($INFO[ListItem.Property(year)])[/COLOR][/B] </label> + <align>left</align> + <aligny>center</aligny> + </control> + <!-- Tagline --> + <control type="textbox"> + <left>440</left> + <top>40</top> + <width>800</width> + <height>30</height> + <font>font30</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>$INFO[ListItem.Property(tagline)]</label> + <align>left</align> + </control> + <!-- Plot --> + <control type="textbox"> + <left>440</left> + <top>80</top> + <width>800</width> + <height>180</height> + <font>font12</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>$INFO[ListItem.Property(plot)]</label> + <align>left</align> + </control> + <!-- Poster --> + <control type="image"> + <bottom>0</bottom> + <left>0</left> + <width>400</width> + <height>600</height> + <texture>$INFO[ListItem.Property(thumbnail)]</texture> + <aspectratio>scale</aspectratio> + </control> + </focusedlayout> + </control> + <!-- CAST --> + <control type="wraplist" id="30501"> + <width>1280</width> + <height>600</height> + <viewtype>wrap</viewtype> + <orientation>horizontal</orientation> + <scrolltime tween="sine" easing="out">300</scrolltime> + <itemlayout height="600" width="220"> + <!-- Poster --> + <control type="image"> + <bottom>0</bottom> + <left>0</left> + <width>200</width> + <height>300</height> + <texture>$INFO[ListItem.Property(thumbnail)]</texture> + <aspectratio>scale</aspectratio> + </control> + </itemlayout> + <focusedlayout height="600" width="420"> + <!-- Title --> + <control type="textbox"> + <left>440</left> + <top>0</top> + <width>800</width> + <height>30</height> + <font>font30_title</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>[B]$INFO[ListItem.Label][/B] </label> + <align>left</align> + <aligny>center</aligny> + </control> + <!-- Tagline --> + <control type="textbox"> + <left>440</left> + <top>40</top> + <width>800</width> + <height>30</height> + <font>font30</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>$INFO[ListItem.Property(job)]</label> + <align>left</align> + </control> + <!-- Plot --> + <control type="textbox"> + <left>440</left> + <top>80</top> + <width>800</width> + <height>180</height> + <font>font13</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>$INFO[ListItem.Property(bio)]</label> + <autoscroll delay="3000" time="2000" repeat="3000"></autoscroll> + <align>left</align> + </control> + <!-- Poster --> + <control type="image"> + <bottom>0</bottom> + <left>0</left> + <width>400</width> + <height>600</height> + <texture>$INFO[ListItem.Property(thumbnail)]</texture> + <aspectratio>scale</aspectratio> + </control> + </focusedlayout> + </control> + </control> + + + <control type="group"> + <top>15</top> + <right>15</right> + <height>50</height> + <width>220</width> + <visible allowhiddenfocus="true">!Control.HasFocus(30501)</visible> + <control type="image"> + <width>50</width> + <height>50</height> + <texture >Infoplus/tmdb.png</texture> + </control> + <control type="textbox" id="30006"> + <left>60</left> + <width>30</width> + <height>50</height> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <font>font30_title</font> + <label></label> + <align>left</align> + <aligny>center</aligny> + </control> + <control type="button" id="30007"> + <left>110</left> + <width>50</width> + <height>50</height> + <texturenofocus colordiffuse="AAFFFFFF">Infoplus/trailer.png</texturenofocus> + <texturefocus colordiffuse="FFFFFFFF">Infoplus/trailer.png</texturefocus> + <onup>30501</onup> + <ondown>30500</ondown> + <onleft>30008</onleft> + <onright>30008</onright> + </control> + <control type="button" id="30008"> + <left>170</left> + <width>50</width> + <height>50</height> + <texturenofocus colordiffuse="AAFFFFFF">Infoplus/search.png</texturenofocus> + <texturefocus colordiffuse="FFFFFFFF">Infoplus/search.png</texturefocus> + <onup>30501</onup> + <ondown>30500</ondown> + <onleft>30007</onleft> + <onright>30007</onright> + </control> + </control> + </control> <!-- GROUP CONTROLS END --> + </controls> +</window> diff --git a/resources/skins/Default/720p/SearchWindow.xml b/resources/skins/Default/720p/SearchWindow.xml new file mode 100644 index 00000000..e7a15f76 --- /dev/null +++ b/resources/skins/Default/720p/SearchWindow.xml @@ -0,0 +1,165 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<window> + <depth>0.52</depth> + <coordinates> + <left>0</left> + <top>0</top> + </coordinates> + <controls> + <!-- CLOSE BUTTON / BACKGROUND --> + <control type="button"> + <left>0</left> + <top>0</top> + <width>100%</width> + <height>100%</height> + <texturefocus colordiffuse="FF232323">white.png</texturefocus> + <texturenofocus colordiffuse="FF232323">white.png</texturenofocus> + <animation effect="fade" time="200">WindowOpen</animation> + <animation effect="fade" time="200">WindowClose</animation> + <onclick>Action(close)</onclick> + </control> + <!-- GROUP CONTROLS --> + <control type="group"> + <left>0</left> + <top>0</top> + <animation type="WindowOpen" reversible="false"> + <effect type="slide" start="0,100" end="0,0" delay="160" time="160" /> + <effect type="fade" delay="160" end="100" time="100" /> + </animation> + <animation type="WindowClose" reversible="false"> + <effect type="slide" start="0,0" end="0,100" delay="160" time="160" /> + <effect type="fade" delay="160" start="100" end="0" time="100" /> + </animation> + + <!-- BACKGROUND --> + <control type="image" id='30000'> + <width>1280</width> + <height>720</height> + <texture colordiffuse="FF888888"/> + </control> + <!-- LOADING --> + <control type="image" id='30011'> + <top>310</top> + <left>590</left> + <width>100</width> + <height>100</height> + <texture>Infoplus/loading.png</texture> + <animation effect="rotate" center="640,360" start="0" end="-360" time="5000" loop="true" condition="Control.IsVisible(30011)">Conditional</animation> + </control> + <!-- TITLE --> + <control type="textbox" id='30001'> + <left>40</left> + <top>15</top> + <width>1000</width> + <height>30</height> + <font>font30_title</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>[UPPERCASE]$ADDON[plugin.video.kod 70821][/UPPERCASE]</label> + <align>left</align> + <aligny>center</aligny> + </control> + + <!-- SEARCH ITEM --> + <control type="fixedlist" id="30500"> + <top>60</top> + <width>1280</width> + <height>600</height> + <onup>30012</onup> + <orientation>horizontal</orientation> + <scrolltime tween="sine" easing="out">300</scrolltime> + <itemlayout height="600" width="220"> + <!-- Poster --> + <control type="image"> + <bottom>0</bottom> + <left>0</left> + <width>200</width> + <height>300</height> + <texture>$INFO[ListItem.Property(thumbnail)]</texture> + <aspectratio>scale</aspectratio> + </control> + </itemlayout> + <focusedlayout height="600" width="420"> + <!-- Title --> + <control type="textbox"> + <left>440</left> + <top>0</top> + <width>800</width> + <height>30</height> + <font>font30_title</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>[B]$INFO[ListItem.Label] [COLOR FFAAAAAA]($INFO[ListItem.Property(year)])[/COLOR][/B] </label> + <align>left</align> + <aligny>center</aligny> + </control> + <!-- Tagline --> + <control type="textbox"> + <left>440</left> + <top>40</top> + <width>800</width> + <height>30</height> + <font>font30</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>$INFO[ListItem.Property(channel)]</label> + <align>left</align> + </control> + <!-- Plot --> + <control type="textbox"> + <left>440</left> + <top>80</top> + <width>800</width> + <height>180</height> + <font>font12</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>$INFO[ListItem.Property(plot)]</label> + <align>left</align> + </control> + <!-- Poster --> + <control type="image"> + <bottom>0</bottom> + <left>0</left> + <width>400</width> + <height>600</height> + <texture>$INFO[ListItem.Property(thumbnail)]</texture> + <aspectratio>scale</aspectratio> + </control> + </focusedlayout> + </control> + <control type="list" id="30012"> + <top>15</top> + <right>15</right> + <height>50</height> + <width>140</width> + <align>right</align> + <ondown>30500</ondown> + <orientation>horizontal</orientation> + <itemlayout height="50" width="70"> + <control type="image"> + <width>50</width> + <height>50</height> + <texture colordiffuse="AAFFFFFF">$INFO[ListItem.Property(thumbnail)]</texture> + </control> + </itemlayout> + <focusedlayout height="50" width="70"> + <control type="image"> + <width>50</width> + <height>50</height> + <texture colordiffuse="FFFFFFFF">$INFO[ListItem.Property(thumbnail)]</texture> + <visible>Control.HasFocus(30012)</visible> + </control> + <control type="image"> + <width>50</width> + <height>50</height> + <texture colordiffuse="AAFFFFFF">$INFO[ListItem.Property(thumbnail)]</texture> + <visible>!Control.HasFocus(30012)</visible> + </control> + </focusedlayout> + </control> + + </control> + <!-- GROUP CONTROLS END --> + </controls> +</window> diff --git a/resources/skins/Default/720p/ServersWindow.xml b/resources/skins/Default/720p/ServersWindow.xml new file mode 100644 index 00000000..cfc64450 --- /dev/null +++ b/resources/skins/Default/720p/ServersWindow.xml @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<window> + <depth>0.52</depth> + <coordinates> + <left>0</left> + <top>0</top> + </coordinates> + <controls> + <!-- CLOSE BUTTON / BACKGROUND --> + <control type="button"> + <left>0</left> + <top>0</top> + <width>100%</width> + <height>100%</height> + <texturefocus colordiffuse="FF232323">white.png</texturefocus> + <texturenofocus colordiffuse="FF232323">white.png</texturenofocus> + <animation effect="fade" time="200">WindowOpen</animation> + <animation effect="fade" time="200">WindowClose</animation> + <onclick>Action(close)</onclick> + </control> + <!-- GROUP CONTROLS --> + <control type="group"> + <left>0</left> + <top>0</top> + <animation type="WindowOpen" reversible="false"> + <effect type="slide" start="0,100" end="0,0" delay="160" time="160" /> + <effect type="fade" delay="160" end="100" time="100" /> + </animation> + <animation type="WindowClose" reversible="false"> + <effect type="slide" start="0,0" end="0,100" delay="160" time="160" /> + <effect type="fade" delay="160" start="100" end="0" time="100" /> + </animation> + + <!-- BACKGROUND --> + <control type="image" id='30000'> + <width>1280</width> + <height>720</height> + <texture colordiffuse="FF888888"/> + </control> + <!-- LOADING --> + <control type="image" id='30011'> + <top>310</top> + <left>590</left> + <width>100</width> + <height>100</height> + <texture>Infoplus/loading.png</texture> + <animation effect="rotate" center="640,360" start="0" end="-360" time="5000" loop="true" condition="Control.IsVisible(30011)">Conditional</animation> + </control> + <!-- TITLE --> + <control type="textbox" id='30001'> + <left>40</left> + <top>15</top> + <width>1000</width> + <height>30</height> + <font>font30_title</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>[UPPERCASE]$ADDON[plugin.video.kod 70145][/UPPERCASE]</label> + <align>left</align> + <aligny>center</aligny> + </control> + + <!-- SEARCH ITEM --> + <control type="fixedlist" id="30500"> + <bottom>0</bottom> + <width>1280</width> + <height>400</height> + <orientation>horizontal</orientation> + <onup>30012</onup> + <scrolltime tween="sine" easing="out">300</scrolltime> + <itemlayout height="400" width="220"> + <!-- Poster --> + <control type="image"> + <bottom>0</bottom> + <left>0</left> + <width>200</width> + <height>200</height> + <texture>$INFO[ListItem.Property(thumbnail)]</texture> + <aspectratio>scale</aspectratio> + </control> + </itemlayout> + <focusedlayout height="400" width="420"> + <!-- Title --> + <control type="textbox"> + <left>440</left> + <top>0</top> + <width>800</width> + <height>30</height> + <font>font30_title</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>[B]$INFO[ListItem.Label] [COLOR FFAAAAAA]($INFO[ListItem.Property(server)])[/COLOR][/B] </label> + <align>left</align> + <aligny>center</aligny> + </control> + <!-- Tagline --> + <control type="textbox"> + <left>440</left> + <top>40</top> + <width>800</width> + <height>30</height> + <font>font30</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>$INFO[ListItem.Property(quality)]</label> + <align>left</align> + </control> + <!-- Plot --> + <control type="textbox"> + <left>440</left> + <top>80</top> + <width>800</width> + <height>180</height> + <font>font12</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>$INFO[ListItem.Property(plot)]</label> + <align>left</align> + </control> + <!-- Poster --> + <control type="image"> + <bottom>0</bottom> + <left>0</left> + <width>400</width> + <height>400</height> + <texture>$INFO[ListItem.Property(thumbnail)]</texture> + <aspectratio>scale</aspectratio> + </control> + </focusedlayout> + </control> + + <control type="list" id="30012"> + <top>15</top> + <right>15</right> + <height>50</height> + <width>140</width> + <align>right</align> + <ondown>30500</ondown> + <orientation>horizontal</orientation> + <itemlayout height="50" width="70"> + <control type="image"> + <width>50</width> + <height>50</height> + <texture colordiffuse="AAFFFFFF">$INFO[ListItem.Property(thumbnail)]</texture> + </control> + </itemlayout> + <focusedlayout height="50" width="70"> + <control type="image"> + <width>50</width> + <height>50</height> + <texture colordiffuse="FFFFFFFF">$INFO[ListItem.Property(thumbnail)]</texture> + <visible>Control.HasFocus(30012)</visible> + </control> + <control type="image"> + <width>50</width> + <height>50</height> + <texture colordiffuse="AAFFFFFF">$INFO[ListItem.Property(thumbnail)]</texture> + <visible>!Control.HasFocus(30012)</visible> + </control> + </focusedlayout> + </control> + + </control> + <!-- GROUP CONTROLS END --> + </controls> +</window> diff --git a/resources/skins/Default/720p/TrailerWindow.xml b/resources/skins/Default/720p/TrailerWindow.xml index 9d0417e5..07d8cba3 100644 --- a/resources/skins/Default/720p/TrailerWindow.xml +++ b/resources/skins/Default/720p/TrailerWindow.xml @@ -1,89 +1,115 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <window> - <allowoverlays>false</allowoverlays> + <depth>0.52</depth> + <coordinates> + <left>0</left> + <top>0</top> + </coordinates> <controls> - <control type="image" id="10"> - <top>0</top> + <!-- CLOSE BUTTON / BACKGROUND --> + <control type="button"> <left>0</left> - <width>1280</width> - <height>720</height> - <texture colordiffuse="FF000000">white.png</texture> - <visible>Player.HasVideo</visible> - <animation effect="fade" start="0%" end="100%" time="200">VisibleChange</animation> - </control> - <control type="videowindow" id="2"> <top>0</top> + <width>100%</width> + <height>100%</height> + <texturefocus colordiffuse="FF232323">white.png</texturefocus> + <texturenofocus colordiffuse="FF232323">white.png</texturenofocus> + <animation effect="fade" time="200">WindowOpen</animation> + <animation effect="fade" time="200">WindowClose</animation> + <onclick>Action(close)</onclick> + </control> + <!-- GROUP CONTROLS --> + <control type="group"> <left>0</left> - <width>1280</width> - <height>720</height> - <visible>Player.HasVideo</visible> - <animation effect="fade" start="0%" end="100%" time="200">VisibleChange</animation> - </control> - <control type="image" id="10"> - <top>260</top> - <left>540</left> - <width>200</width> - <height>200</height> - <texture>Infoplus/pause.png</texture> - <visible>Player.Paused</visible> - <animation effect="fade" start="0%" end="100%" time="200">VisibleChange</animation> - </control> - <control type="image" id="10"> - <top>260</top> - <left>540</left> - <width>200</width> - <height>200</height> - <texture>Infoplus/rewind.png</texture> - <visible>Player.Rewinding</visible> - <animation effect="fade" start="0%" end="100%" time="200">VisibleChange</animation> - </control> - <control type="image" id="10"> - <top>260</top> - <left>540</left> - <width>200</width> - <height>200</height> - <texture>Infoplus/forward.png</texture> - <visible>Player.Forwarding</visible> - <animation effect="fade" start="0%" end="100%" time="200">VisibleChange</animation> - </control> - <control type="image" id="10"> - <top>260</top> - <left>540</left> - <width>200</width> - <height>200</height> - <texture>Infoplus/play.png</texture> - <visible>Player.Play</visible> - <animation effect="fade" start="0%" end="100%" time="200">VisibleChange</animation> - </control> - <control type="button" id="4"> <top>0</top> - <left>0</left> - <width>426</width> - <height>720</height> - <visible>Player.HasVideo</visible> - <onclick>PlayerControl(Rewind)</onclick> - <texturefocus></texturefocus> - <texturenofocus></texturenofocus> - </control> - <control type="button" id="5"> - <top>0</top> - <left>426</left> - <width>426</width> - <height>720</height> - <visible>Player.HasVideo</visible> - <onclick>PlayerControl(Play)</onclick> - <texturefocus></texturefocus> - <texturenofocus></texturenofocus> - </control> - <control type="button" id="6"> - <top>0</top> - <left>853</left> - <width>426</width> - <height>720</height> - <visible>Player.HasVideo</visible> - <onclick>PlayerControl(Forward)</onclick> - <texturefocus></texturefocus> - <texturenofocus></texturenofocus> + <animation type="WindowOpen" reversible="false"> + <effect type="slide" start="0,100" end="0,0" delay="160" time="160" /> + <effect type="fade" delay="160" end="100" time="100" /> + </animation> + <animation type="WindowClose" reversible="false"> + <effect type="slide" start="0,0" end="0,100" delay="160" time="160" /> + <effect type="fade" delay="160" start="100" end="0" time="100" /> + </animation> + + <!-- BACKGROUND --> + <control type="image" id='30000'> + <width>1280</width> + <height>720</height> + <texture colordiffuse="FF888888"/> + </control> + <!-- COUNT --> + <control type="textbox" id='30001'> + <right>40</right> + <bottom>40</bottom> + <width>50</width> + <height>30</height> + <font>font30_title</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label></label> + <align>right</align> + <aligny>center</aligny> + </control> + + <!-- TRAILERS --> + <control type="wraplist" id="30500"> + <top>-177</top> + <width>1280</width> + <height>897</height> + <viewtype>wrap</viewtype> + <orientation>vertical</orientation> + <focusposition>1</focusposition> + <scrolltime tween="sine" easing="out">300</scrolltime> + <itemlayout height="358" width="600"> + <!-- Poster --> + <control type="image"> + <top>10</top> + <left>0</left> + <width>600</width> + <height>338</height> + <texture colordiffuse="FF888888">$INFO[ListItem.Property(thumbnail)]</texture> + <aspectratio>scale</aspectratio> + </control> + </itemlayout> + <focusedlayout height="358" width="600"> + <!-- Title --> + <control type="textbox"> + <left>640</left> + <top>164</top> + <width>600</width> + <height>30</height> + <font>font30_title</font> + <textcolor>FFFFFFFF</textcolor> + <shadowcolor>00000000</shadowcolor> + <label>[B]$INFO[ListItem.Label][/B]</label> + <align>left</align> + <aligny>center</aligny> + </control> + <!-- Poster --> + <control type="image"> + <top>10</top> + <left>0</left> + <width>600</width> + <height>338</height> + <texture>$INFO[ListItem.Property(thumbnail)]</texture> + <aspectratio>scale</aspectratio> + </control> + </focusedlayout> + </control> + + <!-- <control type="button" id="30008"> + <top>15</top> + <right>15</right> + <height>50</height> + <texturenofocus colordiffuse="AAFFFFFF">Infoplus/search.png</texturenofocus> + <texturefocus colordiffuse="FFFFFFFF">Infoplus/search.png</texturefocus> + <onup>30501</onup> + <ondown>30500</ondown> + <onleft>30007</onleft> + <onright>30007</onright> + </control> --> + </control> + <!-- GROUP CONTROLS END --> </controls> -</window> \ No newline at end of file +</window> diff --git a/resources/skins/Default/media/Infoplus/actors_focus.png b/resources/skins/Default/media/Infoplus/actors_focus.png deleted file mode 100644 index 75a83109..00000000 Binary files a/resources/skins/Default/media/Infoplus/actors_focus.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/actors_no_focus.png b/resources/skins/Default/media/Infoplus/actors_no_focus.png deleted file mode 100644 index d7c73696..00000000 Binary files a/resources/skins/Default/media/Infoplus/actors_no_focus.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/add_to_videolibrary.png b/resources/skins/Default/media/Infoplus/add_to_videolibrary.png new file mode 100644 index 00000000..086e7d76 Binary files /dev/null and b/resources/skins/Default/media/Infoplus/add_to_videolibrary.png differ diff --git a/resources/skins/Default/media/Infoplus/background.jpg b/resources/skins/Default/media/Infoplus/background.jpg deleted file mode 100644 index 169fd872..00000000 Binary files a/resources/skins/Default/media/Infoplus/background.jpg and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/downloads.png b/resources/skins/Default/media/Infoplus/downloads.png new file mode 100644 index 00000000..7239122a Binary files /dev/null and b/resources/skins/Default/media/Infoplus/downloads.png differ diff --git a/resources/skins/Default/media/Infoplus/focus.png b/resources/skins/Default/media/Infoplus/focus.png deleted file mode 100644 index 646f47b9..00000000 Binary files a/resources/skins/Default/media/Infoplus/focus.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/forward.png b/resources/skins/Default/media/Infoplus/forward.png deleted file mode 100644 index 505b1968..00000000 Binary files a/resources/skins/Default/media/Infoplus/forward.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/movie.png b/resources/skins/Default/media/Infoplus/movie.png new file mode 100644 index 00000000..7a5d7764 Binary files /dev/null and b/resources/skins/Default/media/Infoplus/movie.png differ diff --git a/resources/skins/Default/media/Infoplus/next_focus.png b/resources/skins/Default/media/Infoplus/next_focus.png deleted file mode 100644 index eb047c35..00000000 Binary files a/resources/skins/Default/media/Infoplus/next_focus.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/next_no_focus.png b/resources/skins/Default/media/Infoplus/next_no_focus.png deleted file mode 100644 index 74a65ccb..00000000 Binary files a/resources/skins/Default/media/Infoplus/next_no_focus.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/nonfocus.png b/resources/skins/Default/media/Infoplus/nonfocus.png deleted file mode 100644 index 7169cdd4..00000000 Binary files a/resources/skins/Default/media/Infoplus/nonfocus.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/pause.png b/resources/skins/Default/media/Infoplus/pause.png deleted file mode 100644 index 2c4d91dd..00000000 Binary files a/resources/skins/Default/media/Infoplus/pause.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/play.png b/resources/skins/Default/media/Infoplus/play.png deleted file mode 100644 index d16837c3..00000000 Binary files a/resources/skins/Default/media/Infoplus/play.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/previous_focus.png b/resources/skins/Default/media/Infoplus/previous_focus.png deleted file mode 100644 index cf08687a..00000000 Binary files a/resources/skins/Default/media/Infoplus/previous_focus.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/previous_no_focus.png b/resources/skins/Default/media/Infoplus/previous_no_focus.png deleted file mode 100644 index 44f4b7ea..00000000 Binary files a/resources/skins/Default/media/Infoplus/previous_no_focus.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/rewind.png b/resources/skins/Default/media/Infoplus/rewind.png deleted file mode 100644 index 55fba490..00000000 Binary files a/resources/skins/Default/media/Infoplus/rewind.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/search_focus.png b/resources/skins/Default/media/Infoplus/search.png similarity index 100% rename from resources/skins/Default/media/Infoplus/search_focus.png rename to resources/skins/Default/media/Infoplus/search.png diff --git a/resources/skins/Default/media/Infoplus/search_no_focus.png b/resources/skins/Default/media/Infoplus/search_no_focus.png deleted file mode 100644 index a92a08dd..00000000 Binary files a/resources/skins/Default/media/Infoplus/search_no_focus.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/trailer_focus.png b/resources/skins/Default/media/Infoplus/trailer.png similarity index 100% rename from resources/skins/Default/media/Infoplus/trailer_focus.png rename to resources/skins/Default/media/Infoplus/trailer.png diff --git a/resources/skins/Default/media/Infoplus/trailer_no_focus.png b/resources/skins/Default/media/Infoplus/trailer_no_focus.png deleted file mode 100644 index ef3e0ce7..00000000 Binary files a/resources/skins/Default/media/Infoplus/trailer_no_focus.png and /dev/null differ diff --git a/resources/skins/Default/media/Infoplus/tv.png b/resources/skins/Default/media/Infoplus/tv.png new file mode 100644 index 00000000..cac2bb6b Binary files /dev/null and b/resources/skins/Default/media/Infoplus/tv.png differ diff --git a/resources/skins/Default/media/Infoplus/white.png b/resources/skins/Default/media/Infoplus/white.png deleted file mode 100644 index 528c66f6..00000000 Binary files a/resources/skins/Default/media/Infoplus/white.png and /dev/null differ diff --git a/specials/downloads.py b/specials/downloads.py index 495ddf21..f11f4f46 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -606,7 +606,7 @@ def download_from_url(url, item): update_json(item.path, {"downloadUrl": d.download_url, "downloadStatus": STATUS_CODES.downloading, "downloadSize": d.size[0], "downloadProgress": d.progress, "downloadCompleted": d.downloaded[0], "downloadFilename": file}) - d.start_diainfo(config.get_localized_string(60332)) + d.start_dialog(config.get_localized_string(60332)) # Download stopped. We get the state: # Download failed