<[^>]+><[^>]+><[^>]+><[^>]+>\s*(?P
[^<]+)<[^>]+><[^>]+><[^>]+>(?P[^<]+)<'
def itemHook(item):
item.title = support.typo(item.hour + ' - ' + item.name,'bold')
@@ -99,7 +99,7 @@ def peliculas(item):
def episodios(item):
data = support.match(item).data
# debug = True
- action = 'play'
+ action = 'findvideos'
if '>puntate<' in data:
patronBlock = r'>puntate<(?P.*?)home-block-outbrain'
url = support.match(data, patron=r'>puntate<[^>]+>[^>]+>[^>]+> 1 and not itemlist[1].server:
+ run(itemlist[0].clone(no_return=True))
else:
platformtools.serverWindow(item, itemlist)
diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py
index ce2f759e..62189d19 100644
--- a/platformcode/platformtools.py
+++ b/platformcode/platformtools.py
@@ -1384,9 +1384,8 @@ def set_player(item, xlistitem, mediaurl, view, strm):
if (player_mode == 3 and mediaurl.startswith("rtmp")): player_mode = 0
elif "megacrypter.com" in mediaurl: player_mode = 3
logger.info("mediaurl=" + mediaurl)
-
+ prevent_busy()
if player_mode in [0,1]:
- prevent_busy()
if player_mode in [1]:
item.played_time = resume_playback(get_played_time(item))
@@ -1421,13 +1420,14 @@ def set_player(item, xlistitem, mediaurl, view, strm):
# if it is a video library file send to mark as seen
if strm or item.strm_path: item.options['strm'] = True
- # if player_mode == 1: item.options['continue'] = True
+
if not mediaurl.startswith('plugin'):
from platformcode import xbmc_videolibrary
xbmc_videolibrary.mark_auto_as_watched(item)
# for cases where the audio playback window appears in place of the video one
if item.focusOnVideoPlayer:
+ from core.support import dbg;dbg()
while is_playing() and xbmcgui.getCurrentWindowId() != 12006:
continue
xbmc.sleep(500)
@@ -1882,10 +1882,10 @@ def serverWindow(item, itemlist):
while not xbmc.Monitor().abortRequested():
played = True
if not is_playing():
- if config.get_setting('next_ep') == 3:
- xbmc.sleep(500)
- if is_playing():
- return
+ # if config.get_setting('next_ep') == 3:
+ # xbmc.sleep(500)
+ # if is_playing():
+ # return
if config.get_setting('autoplay') or reopen:
xbmc.sleep(200)
if not db['controls'].get('reopen', False):
diff --git a/platformcode/xbmc_videolibrary.py b/platformcode/xbmc_videolibrary.py
index bec58178..4ea20b5b 100644
--- a/platformcode/xbmc_videolibrary.py
+++ b/platformcode/xbmc_videolibrary.py
@@ -33,7 +33,6 @@ def mark_auto_as_watched(item):
marked = False
sync = False
next_episode = None
- show_server = True
mark_time = 0
percentage = float(config.get_setting("watched_setting")) / 100
@@ -68,7 +67,6 @@ def mark_auto_as_watched(item):
item.played_time = 0
platformtools.set_played_time(item)
if item.options['strm'] : sync = True
- show_server = False
from specials import videolibrary
videolibrary.mark_content_as_watched2(item)
if not next_episode:
@@ -93,6 +91,7 @@ def mark_auto_as_watched(item):
else:
item.played_time = 0
db['controls']['reopen'] = False
+ db.close()
platformtools.set_played_time(item)
# Silent sync with Trakt
@@ -101,19 +100,10 @@ def mark_auto_as_watched(item):
while platformtools.is_playing():
xbmc.sleep(100)
- # if not show_server and item.play_from != 'window' and not item.no_return:
- # xbmc.sleep(200)
- # xbmc.executebuiltin('Action(close)')
- # xbmc.sleep(500)
-
if next_episode and next_episode.next_ep and config.get_setting('next_ep') < 3:
from platformcode.launcher import run
run(next_episode)
- # db need to be closed when not used, it will cause freezes
- db.close()
- # from core.support import dbg;dbg()
-
# If it is configured to mark as seen
if config.get_setting("mark_as_watched", "videolibrary"):
threading.Thread(target=mark_as_watched_subThread, args=[item]).start()