Migliorie al Menu Rapido

This commit is contained in:
Alhaziel01
2020-12-18 16:55:58 +01:00
parent e4aaeca3c8
commit 7e49da0998
7 changed files with 40 additions and 39 deletions

View File

@@ -55,7 +55,7 @@ def getmainlist(view="thumb_"):
thumb_setting = "setting_%s.png" % 0 # config.get_setting("plugin_updates_available")
itemlist.append(Item(title=config.get_localized_string(30100), channel="setting", action="settings",
thumbnail=get_thumb(thumb_setting, view), category=config.get_localized_string(30100), viewmode="list"))
thumbnail=get_thumb(thumb_setting, view), category=config.get_localized_string(30100), viewmode="list", folder=False))
itemlist.append(Item(title=config.get_localized_string(30104) + " (v" + config.get_addon_version(with_fix=True) + ")", channel="help", action="mainlist",
thumbnail=get_thumb("help.png", view), category=config.get_localized_string(30104), viewmode="list"))
return itemlist

View File

@@ -100,7 +100,7 @@ class Main(xbmcgui.WindowXMLDialog):
if not menuentry.channel: menuentry.channel = prevchannel
item = xbmcgui.ListItem(menuentry.title)
if not submenu and menuentry.channel in ['news', 'channelselector', 'search', 'videolibrary']:
item.setProperty('sub', 'Controls/spinUp-Focus.png')
item.setProperty('sub', 'Shortcut/sub.png')
if menuentry.title != 'Redirect':
for key , value in json.loads(menuentry.tojson()).items():
item.setProperty(key, str(value))
@@ -115,7 +115,10 @@ class Main(xbmcgui.WindowXMLDialog):
if control_id == 32500:
action = self.getControl(32500).getSelectedItem().getProperty('run')
self.close()
xbmc.executebuiltin('ActivateWindow(10025, "plugin://plugin.video.kod/?' + base64.b64encode(action) + '")')
if self.getControl(32500).getSelectedItem().getProperty('folder') == 'False':
xbmc.executebuiltin('RunPlugin("plugin://plugin.video.kod/?' + base64.b64encode(action) + '")')
else:
xbmc.executebuiltin('ActivateWindow(10025, "plugin://plugin.video.kod/?' + base64.b64encode(action) + '")')

View File

@@ -78,27 +78,7 @@
<top>1</top>
<width>220</width>
<height>218</height>
<texture colordiffuse="FF0082C2">white.png</texture>
</control>
<control type="textbox">
<left>0</left>
<top>160</top>
<width>220</width>
<height>74</height>
<font>font12</font>
<textcolor>FFFFFFFF</textcolor>
<label>$INFO[ListItem.Label]</label>
<align>center</align>
<aligny>center</aligny>
</control>
<control type="image">
<left>100</left>
<top>5</top>
<width>20</width>
<height>20</height>
<texture>$INFO[ListItem.Property(sub)]</texture>
<aspectratio>keep</aspectratio>
<align>center</align>
<texture colordiffuse="550082C2">white.png</texture>
</control>
<control type="image">
<width>220</width>
@@ -107,6 +87,25 @@
<aspectratio>keep</aspectratio>
<align>center</align>
</control>
<control type="textbox">
<left>0</left>
<top>160</top>
<width>220</width>
<height>74</height>
<textcolor>FF232323</textcolor>
<label>$INFO[ListItem.Label]</label>
<align>center</align>
<aligny>center</aligny>
</control>
<control type="image">
<left>90</left>
<top>0</top>
<width>40</width>
<height>40</height>
<texture colordiffuse="FF232323">$INFO[ListItem.Property(sub)]</texture>
<aspectratio>keep</aspectratio>
<align>center</align>
</control>
</focusedlayout>
</control>
</control> <!-- GROUP CONTROLS END -->

View File

@@ -80,33 +80,32 @@
<height>218</height>
<texture colordiffuse="FF0082C2">white.png</texture>
</control>
<control type="image">
<width>220</width>
<height>220</height>
<texture>$INFO[ListItem.Property(thumbnail)]</texture>
<aspectratio>keep</aspectratio>
<align>center</align>
</control>
<control type="textbox">
<left>0</left>
<top>160</top>
<width>220</width>
<height>74</height>
<font>font12</font>
<textcolor>FFFFFFFF</textcolor>
<label>$INFO[ListItem.Label]</label>
<align>center</align>
<aligny>center</aligny>
</control>
<control type="image">
<left>100</left>
<top>5</top>
<width>20</width>
<height>20</height>
<left>90</left>
<top>0</top>
<width>40</width>
<height>40</height>
<texture>$INFO[ListItem.Property(sub)]</texture>
<aspectratio>keep</aspectratio>
<align>center</align>
</control>
<control type="image">
<width>220</width>
<height>220</height>
<texture>$INFO[ListItem.Property(thumbnail)]</texture>
<aspectratio>keep</aspectratio>
<align>center</align>
</control>
</focusedlayout>
</control>
</control> <!-- GROUP CONTROLS END -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -52,8 +52,8 @@ def mainlist(item):
itemlist += [Item(channel=item.channel, title=config.get_localized_string(59995), action='saved_search', thumbnail=get_thumb('search.png')),
Item(channel=item.channel, title=config.get_localized_string(60420), action='sub_menu', thumbnail=get_thumb('search.png')),
Item(channel="tvmoviedb", title=config.get_localized_string(70274), action="mainlist", thumbnail=get_thumb("search.png")),
Item(channel=item.channel, title=typo(config.get_localized_string(59994), 'color kod bold'), action='setting_channel_new', thumbnail=get_thumb('setting_0.png')),
Item(channel='shortcuts', title=typo(config.get_localized_string(70286), 'color kod bold'), action='SettingOnPosition', category=5, setting=1, thumbnail=get_thumb('setting_0.png'))]
Item(channel=item.channel, title=typo(config.get_localized_string(59994), 'color kod bold'), action='setting_channel_new', thumbnail=get_thumb('setting_0.png'),folder=False),
Item(channel='shortcuts', title=typo(config.get_localized_string(70286), 'color kod bold'), action='SettingOnPosition', category=5, setting=1, thumbnail=get_thumb('setting_0.png'),folder=False)]
itemlist = set_context(itemlist)
return itemlist

View File

@@ -28,7 +28,7 @@ def mainlist(item):
category=config.get_localized_string(70271), thumbnail=thumb("videolibrary_tvshow"),
context=[{"channel":"videolibrary", "action":"update_videolibrary", "title":config.get_localized_string(70269)}]),
Item(channel='shortcuts', action="SettingOnPosition", title=typo(config.get_localized_string(70287),'bold color kod'),
category=2, setting=1, thumbnail = thumb("setting_0"))]
category=2, setting=1, thumbnail = thumb("setting_0"),folder=False)]
return itemlist