Fix Episodio Successivo

This commit is contained in:
Alhaziel
2020-01-09 10:41:59 +01:00
parent 6850d8a92d
commit b107d5dadf
3 changed files with 33 additions and 23 deletions
+1 -1
View File
@@ -442,7 +442,7 @@ def play_from_library(item):
@param item: elemento con información @param item: elemento con información
""" """
logger.info() logger.info()
logger.debug("item: \n" + item.tostring('\n')) # logger.debug("item: \n" + item.tostring('\n'))
import xbmcgui import xbmcgui
import xbmcplugin import xbmcplugin
+18 -17
View File
@@ -7,14 +7,15 @@
<control type="group"> <control type="group">
<animation type="WindowOpen" reversible="false"> <animation type="WindowOpen" reversible="false">
<effect type="fade" start="0" end="100" time="600" /> <effect type="fade" start="0" end="100" time="600" />
<effect type="slide" start="-115,-0" end="0,0" time="600" /> <effect type="slide" start="115,0" end="0,0" time="600" />
</animation> </animation>
<animation type="WindowClose" reversible="false"> <animation type="WindowClose" reversible="false">
<effect type="fade" start="100" end="0" time="400" /> <effect type="fade" start="100" end="0" time="400" />
<effect type="slide" start="0,0" end="-115,0" time="400" /> <effect type="slide" start="0,0" end="115,0" time="400" />
</animation> </animation>
<control type="group"> <control type="group">
<right>0</right> <right>0</right>
<top>10</top>
<height>50</height> <height>50</height>
<width>45%</width> <width>45%</width>
<!-- Background --> <!-- Background -->
@@ -47,14 +48,14 @@
<height>50</height> <height>50</height>
<width min="50">auto</width> <width min="50">auto</width>
<font>font30_title</font> <font>font30_title</font>
<textoffsetx>55</textoffsetx> <textoffsetx>30</textoffsetx>
<textcolor>ddffffff</textcolor> <textcolor>80FFFFFF</textcolor>
<focusedcolor>eeffffff</focusedcolor> <focusedcolor>FFFFFFFF</focusedcolor>
<selectedcolor>ddffffff</selectedcolor> <selectedcolor>80FFFFFF</selectedcolor>
<shadowcolor>22000000</shadowcolor> <shadowcolor>22000000</shadowcolor>
<aligny>center</aligny> <aligny>center</aligny>
<align>center</align> <align>center</align>
<texturefocus border="10" colordiffuse="FF65B3DA">Shortcut/button-fo.png</texturefocus> <texturefocus border="10" colordiffuse="0065B3DA">Shortcut/button-fo.png</texturefocus>
<texturenofocus border="10" colordiffuse="0065B3DA">Shortcut/button-fo.png</texturenofocus> <texturenofocus border="10" colordiffuse="0065B3DA">Shortcut/button-fo.png</texturenofocus>
<pulseonselect>no</pulseonselect> <pulseonselect>no</pulseonselect>
</control> </control>
@@ -65,14 +66,14 @@
<height>50</height> <height>50</height>
<width min="50">auto</width> <width min="50">auto</width>
<font>font30_title</font> <font>font30_title</font>
<textoffsetx>55</textoffsetx> <textoffsetx>30</textoffsetx>
<textcolor>ddffffff</textcolor> <textcolor>80FFFFFF</textcolor>
<focusedcolor>eeffffff</focusedcolor> <focusedcolor>FFFFFFFF</focusedcolor>
<selectedcolor>ddffffff</selectedcolor> <selectedcolor>80FFFFFF</selectedcolor>
<shadowcolor>22000000</shadowcolor> <shadowcolor>22000000</shadowcolor>
<aligny>center</aligny> <aligny>center</aligny>
<align>center</align> <align>center</align>
<texturefocus border="10" colordiffuse="FF65B3DA">Shortcut/button-fo.png</texturefocus> <texturefocus border="10" colordiffuse="0065B3DA">Shortcut/button-fo.png</texturefocus>
<texturenofocus border="10" colordiffuse="0065B3DA">Shortcut/button-fo.png</texturenofocus> <texturenofocus border="10" colordiffuse="0065B3DA">Shortcut/button-fo.png</texturenofocus>
<pulseonselect>no</pulseonselect> <pulseonselect>no</pulseonselect>
</control> </control>
@@ -81,14 +82,14 @@
<height>50</height> <height>50</height>
<width min="50">auto</width> <width min="50">auto</width>
<font>font30_title</font> <font>font30_title</font>
<textoffsetx>15</textoffsetx> <textoffsetx>30</textoffsetx>
<textcolor>ddffffff</textcolor> <textcolor>80FFFFFF</textcolor>
<focusedcolor>eeffffff</focusedcolor> <focusedcolor>FFFFFFFF</focusedcolor>
<selectedcolor>ddffffff</selectedcolor> <selectedcolor>80FFFFFF</selectedcolor>
<shadowcolor>22000000</shadowcolor> <shadowcolor>22000000</shadowcolor>
<aligny>center</aligny> <aligny>center</aligny>
<align>center</align> <align>center</align>
<texturefocus border="10" colordiffuse="FF65B3DA">Shortcut/button-fo.png</texturefocus> <texturefocus border="10" colordiffuse="0065B3DA">Shortcut/button-fo.png</texturefocus>
<texturenofocus border="10" colordiffuse="0065B3DA">Shortcut/button-fo.png</texturenofocus> <texturenofocus border="10" colordiffuse="0065B3DA">Shortcut/button-fo.png</texturenofocus>
<pulseonselect>no</pulseonselect> <pulseonselect>no</pulseonselect>
</control> </control>
+14 -5
View File
@@ -37,14 +37,23 @@ def afther_stop(item):
if next_file: if next_file:
play_next = False play_next = False
time_limit = time() + 30 time_limit = time() + 30
TimeFromEnd = config.get_setting('next_ep_seconds') time_steps = [20,30,40,50,60]
TimeFromEnd = time_steps[config.get_setting('next_ep_seconds')]
logger.info('TEMPO: '+str(TimeFromEnd))
while not platformtools.is_playing() and time() < time_limit: while not platformtools.is_playing() and time() < time_limit:
sleep(1) sleep(1)
sleep(1)
while platformtools.is_playing() and play_next == False: while platformtools.is_playing() and play_next == False:
Difference = xbmc.Player().getTotalTime() - xbmc.Player().getTime() try:
if 0 < Difference <= 60: Total = xbmc.Player().getTotalTime()
logger.info('Exit '+str(Difference)) Actual = xbmc.Player().getTime()
play_next = True Difference = Total - Actual
if Total > Actual >= Difference:
play_next = True
except:
break
if play_next: if play_next:
play_next = False play_next = False