diff --git a/core/tmdb.py b/core/tmdb.py index 55306d83..d2919621 100644 --- a/core/tmdb.py +++ b/core/tmdb.py @@ -565,16 +565,14 @@ def select_group(groups, item): selected = -1 url = 'https://api.themoviedb.org/3/tv/{}?api_key=a1ab8b8669da03637a4b98fa39c39228&language={}'.format(item.infoLabels['tmdb_id'], def_lang) res = requests.get(url).json() - selections = ['[B]Original[/B] Seasons: {} Episodes: {}'.format(res.get('number_of_seasons',0), res.get('number_of_episodes',0))] + selections = [['Original',res.get('number_of_seasons',0), res.get('number_of_episodes',0), '', item.thumbnail]] ids = ['original'] for group in groups: - name = '[B]{}[/B] Seasons: {} Episodes: {}'.format(group.get('name',''), group.get('group_count',0), group.get('episode_count',0)) - description = group.get('description','') - if description: - name = '{}\n{}'.format(name, description) + # name = '{} Seasons: {} Episodes: {}'.format(group.get('name',''), group.get('group_count',0), group.get('episode_count',0)) + # description = group.get('description','') ID = group.get('id','') if ID: - selections.append(name) + selections.append([group.get('name',''), group.get('group_count',0), group.get('episode_count',0), group.get('description',''), item.thumbnail]) ids.append(ID) if selections and ids: selected = platformtools.dialog_select_group(config.get_localized_string(70831), selections) diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 0d1c415a..3fef5ab9 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -239,9 +239,14 @@ def dialog_select_group(heading, _list, preselect=0): def onInit(self): self.getControl(1).setText(self.heading) itemlist = [] - for n, text in enumerate(self.list): + for n, it in enumerate(self.list): + logger.debug(it) item = xbmcgui.ListItem(str(n)) - item.setProperty('title', text) + item.setProperty('title', it[0]) + item.setProperty('seasons', str(it[1])) + item.setProperty('episodes', str(it[2])) + item.setProperty('description', '\n' + it[3]) + item.setProperty('thumb', it[4]) itemlist.append(item) self.getControl(2).addItems(itemlist) @@ -496,7 +501,6 @@ def set_context_commands(item, item_url, parent_item, **kwargs): 2. Adding options according to criteria Options can be added to the context menu to items that meet certain conditions. - 3. Adding options to all items Options can be added to the context menu for all items diff --git a/resources/skins/Default/720p/SelectGroup.xml b/resources/skins/Default/720p/SelectGroup.xml index 8ded74c2..b53bad08 100644 --- a/resources/skins/Default/720p/SelectGroup.xml +++ b/resources/skins/Default/720p/SelectGroup.xml @@ -12,9 +12,9 @@ Container - 200 + 40 60 - 860 + 1200 600 Background @@ -22,49 +22,56 @@ 100% white.png + + Poster + 0 + 0 + 600 + 400 + $INFO[Container(2).ListItem.Property(thumb)] + Heading 0 - 0 - 60 - 100% + 460 + 80 + 680 font13 FFFFFFFF - center + left center - 30 - 70 - 795 - 530 + 440 + 80 + 720 + 480 List 0 0 - 795 + 720 530 100 4 vertical 200 - 4 - + Selected Item 20 - 20 - 765 - 110 + 0 + 680 + 60 font13 FFFFFFFF - - center + + left center - + 1 100% @@ -75,39 +82,22 @@ Selected Item 20 20 - 765 - 110 + 680 + 160 font13 FFFFFFFF - + True - center + left center - - Scrollbar - 800 - 0 - 5 - 470 - true - white.png - white.png - white.png - white.png - white.png - vertical - false - 2 - 3 - Close Button 20 - 10 + 20 40 40 close.png