Nuova Modalità di Visualizzazione per Next Ep.

This commit is contained in:
Alhaziel
2020-02-15 18:56:18 +01:00
parent 4e2d3d9e46
commit 2344409faa
8 changed files with 186 additions and 14 deletions

View File

@@ -5738,7 +5738,19 @@ msgid "Playback"
msgstr ""
msgctxt "#70754"
msgid "Compact mode"
msgid "Display mode"
msgstr ""
msgctxt "#70755"
msgid "Default"
msgstr ""
msgctxt "#70756"
msgid "Extended"
msgstr ""
msgctxt "#70757"
msgid "Compact"
msgstr ""
# DNS start [ settings and declaration ]

View File

@@ -5742,8 +5742,20 @@ msgid "Playback"
msgstr "Riproduzione"
msgctxt "#70754"
msgid "Compact mode"
msgstr "Modalità compatta"
msgid "Display mode"
msgstr "Modalità visualizzazione"
msgctxt "#70755"
msgid "Default"
msgstr "Predefinita"
msgctxt "#70756"
msgid "Extended"
msgstr "Estesa"
msgctxt "#70757"
msgid "Compact"
msgstr "Compatta"
# DNS start [ settings and declaration ]
msgctxt "#707401"

View File

@@ -59,7 +59,8 @@
<setting id="videolibrary_kodi" type="bool" label="70120" enable="lt(-1,2)+eq(0,false)" default="false"/>
<setting id="videolibrary_max_quality" type="bool" label="70729" default="false" visible="true"/>
<setting id="next_ep" type="enum" label="70746" lvalues="70752|70747|70748" default="0"/>
<setting id="next_ep_type" type="bool" label="70754" default="false" visible="eq(-1,2)"/>
<setting id="next_ep_type" type="select" label="70754" lvalues="70755|70756|70757" default="0" visible="eq(-1,2)"/>
<!-- <setting id="next_ep_type" type="bool" label="70754" default="false" visible="eq(-1,2)"/> -->
<setting id="next_ep_seconds" type="enum" values="20|30|40|50|60|70|80|90|100|110|120" label="70749" default="2" visible="!eq(-2,0)"/>
</category>

View File

@@ -42,7 +42,7 @@
<itemgap>0</itemgap>
<align>right</align>
<control type="button" id="11">
<label>$ADDON[plugin.video.kod 70750] $INFO[Player.TimeRemaining(mm:ss)]</label>
<label>$INFO[Window.Property(title)] | $INFO[Window.Property(ep_title)] | $INFO[Player.TimeRemaining(secs),,]</label>
<onclick>SendClick(3012)</onclick>
<height>40</height>
<width min="50">auto</width>

View File

@@ -42,7 +42,7 @@
<itemgap>0</itemgap>
<align>right</align>
<control type="button" id="11">
<label>[B]$INFO[Player.TimeRemaining(mm:ss)][/B]</label>
<label>[B]$INFO[Player.TimeRemaining(secs),,][/B]</label>
<onclick>SendClick(3012)</onclick>
<!-- <visible>!Integer.IsGreater(Player.TimeRemaining,59)</visible> -->
<height>40</height>

View File

@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<window>
<defaultcontrol always="true">20</defaultcontrol>
<onload>Dialog.Close(fullscreeninfo,true)</onload>
<onload>Dialog.Close(videoosd,true)</onload>
<controls>
<control type="group">
<animation type="WindowOpen" reversible="false">
<effect type="fade" start="0" end="100" time="600" />
<effect type="slide" start="115,0" end="0,0" time="600" />
</animation>
<animation type="WindowClose" reversible="false">
<effect type="fade" start="100" end="0" time="400" />
<effect type="slide" start="0,0" end="115,0" time="400" />
</animation>
<control type="group">
<right>0</right>
<bottom>20</bottom>
<height>220</height>
<width>326</width>
<!-- Background -->
<control type="image">
<top>0</top>
<right>0</right>
<width>326</width>
<height>180</height>
<texture>$INFO[Window.Property(next_img)]</texture>
</control>
<control type="group">
<top>0</top>
<right>0</right>
<width>100%</width>
<!-- buttons -->
<control type="button" id="3012">
<left>-1000</left>
<top>-1000</top>
<height>1</height>
<width>1</width>
</control>
<control type="grouplist" id="20">
<orientation>vertical</orientation>
<height>220</height>
<width>326</width>
<itemgap>0</itemgap>
<right>0</right>
<control type="button" id="11">
<label></label>
<onclick>SendClick(3012)</onclick>
<height>180</height>
<width>326</width>
<right>0</right>
<font>font30_title</font>
<textoffsety>20</textoffsety>
<textcolor>FFFFFFFF</textcolor>
<focusedcolor>FFFFFFFF</focusedcolor>
<selectedcolor>FFFFFFFF</selectedcolor>
<shadowcolor>22000000</shadowcolor>
<aligny>top</aligny>
<align>center</align>
<texturefocus border="10">NextDialog/background-play.png</texturefocus>
<texturenofocus border="10" colordiffuse="00232323">NextDialog/background-diffuse.png</texturenofocus>
<pulseonselect>no</pulseonselect>
</control>
<control type="button" id="3013">
<label>$ADDON[plugin.video.kod 60396]</label>
<height>40</height>
<width>326</width>
<font>font30_title</font>
<textoffsetx>20</textoffsetx>
<textcolor>80FFFFFF</textcolor>
<focusedcolor>FFFFFFFF</focusedcolor>
<selectedcolor>80FFFFFF</selectedcolor>
<shadowcolor>22000000</shadowcolor>
<aligny>center</aligny>
<align>center</align>
<texturefocus border="10" colordiffuse="88232323">NextDialog/background-diffuse.png</texturefocus>
<texturenofocus border="10" colordiffuse="88232323">NextDialog/background-diffuse.png</texturenofocus>
<pulseonselect>no</pulseonselect>
</control>
</control>
<control type="label">
<bottom>60</bottom>
<height>40</height>
<aligny>center</aligny>
<visible>true</visible>
<align>center</align>
<scroll>true</scroll>
<scrollspeed>50</scrollspeed>
<textcolor>FFFFFFFF</textcolor>
<shadowcolor>ff000000</shadowcolor>
<info>Window.Property(title)</info>
<font>font30_title</font>
</control>
<control type="label">
<bottom>40</bottom>
<height>40</height>
<aligny>center</aligny>
<visible>true</visible>
<align>center</align>
<scroll>true</scroll>
<scrollspeed>50</scrollspeed>
<textcolor>FFFFFFFF</textcolor>
<shadowcolor>ff000000</shadowcolor>
<info>Window.Property(ep_title)</info>
<font>font20_title</font>
</control>
<control type="label">
<top>20</top>
<left>20</left>
<height>auto</height>
<aligny>top</aligny>
<visible>true</visible>
<align>left</align>
<scroll>true</scroll>
<scrollspeed>50</scrollspeed>
<textcolor>FFFFFFFF</textcolor>
<shadowcolor>ff000000</shadowcolor>
<info>Player.TimeRemaining(secs),,</info>
<font>font30_title</font>
</control>
</control>
</control>
</control>
</controls>
</window>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -6,8 +6,14 @@ from core import scrapertools
from core import jsontools, filetools
from lib.concurrent import futures
PLAYER_STOP = 13
ND = 'NextDialogCompact.xml' if config.get_setting('next_ep_type') else 'NextDialog.xml'
next_dialogs = ['NextDialog.xml', 'NextDialogExtended.xml', 'NextDialogCompact.xml']
next_ep_type = config.get_setting('next_ep_type')
# compatibility with previous version
if type(next_ep_type) == bool:
ND = 'NextDialogCompact.xml' if config.get_setting('next_ep_type') else 'NextDialog.xml'
else:
ND = next_dialogs[next_ep_type]
def check(item):
return True if config.get_setting('next_ep') > 0 and item.contentType != 'movie' else False
@@ -46,7 +52,7 @@ def next_ep(item):
time_over = False
time_limit = time() + 30
time_steps = [20,30,40,50,60]
time_steps = [20,30,40,50,60,70,80,90,100,110,120]
TimeFromEnd = time_steps[config.get_setting('next_ep_seconds')]
# wait until the video plays
@@ -84,6 +90,7 @@ def next_ep(item):
next_file = None
else:
next_file = fileList[nextIndex]
logger.info('NEXTFILE' + next_file)
# start next episode window afther x time
if next_file:
@@ -102,8 +109,9 @@ def next_ep(item):
infoLabels= {'episode': episode, 'mediatype': 'tvshow', 'season': season, 'title': next_ep},
strm_path= filetools.join(base_path, next_file))
global ITEM
ITEM = item
global INFO
INFO = filetools.join(path, next_file.replace("strm", "nfo"))
logger.info('NEXTINFO' + INFO)
nextDialog = NextDialog(ND, config.get_runtime_path())
nextDialog.show()
@@ -142,9 +150,23 @@ class NextDialog(xbmcgui.WindowXMLDialog):
def __init__(self, *args, **kwargs):
logger.info()
self.action_exitkeys_id = [10, 13]
self.action_exitkeys_id = [xbmcgui.ACTION_STOP, xbmcgui.ACTION_BACKSPACE, xbmcgui.ACTION_PREVIOUS_MENU, xbmcgui.ACTION_NAV_BACK]
self.progress_control = None
self.item = ITEM
# set info
with open(INFO, 'r') as f:
full_info = f.readlines()
full_info = full_info[1:]
full_info = "".join(full_info)
info = jsontools.load(full_info)
info = info["infoLabels"]
self.setProperty("title", info["tvshowtitle"])
self.setProperty("ep_title", "%dx%02d - %s" % (info["season"], info["episode"], info["title"]))
if "episodio_imagen" in info:
img = info["episodio_imagen"]
else:
img = filetools.join(config.get_runtime_path(), "resources", "noimage.png")
self.setProperty("next_img", img)
def set_still_watching(self, stillwatching):
self.stillwatching = stillwatching
@@ -175,6 +197,6 @@ class NextDialog(xbmcgui.WindowXMLDialog):
def onAction(self, action):
logger.info()
if action == PLAYER_STOP:
if action in self.action_exitkeys_id:
self.set_continue_watching(False)
self.close()