(?:[Ff]ilm|]+>'
@@ -94,16 +90,19 @@ def peliculas(item):
item.title = item.title.replace('[ITA]','[Sub-ITA]')
item.contentLanguage = 'Sub-ITA'
return item
-
- action = 'findvideos' if item.contentType == 'movie' else 'episodios'
-
return locals()
+def check(item):
+ if support.match(item, headers=headers, patron=r'(category tag">Film)').match:
+ item.contentType = 'movie'
+ return findvideos(item)
+ else:
+ item.contentType = 'tvshow'
+ return episodios(item)
@support.scrape
def episodios(item):
anime = True
- # debug=True
data = support.match(item, headers=headers).data
if 'https://vcrypt.net' in data:
patron = r'(?: /> |)(?P\d+.\d+)?(?: – )?(?P[^<]+).*?)(?:
0:
Search(ITEM.clone(action='search', search_text=title))
@@ -103,6 +105,12 @@ class MainWindow(xbmcgui.WindowXMLDialog):
info = self.getControl(RECOMANDED).getSelectedItem()
self.close()
Trailer(info)
+ elif control_id in [IMAGES]:
+ info = self.getControl(RECOMANDED).getSelectedItem()
+ images = tmdb.Tmdb(id_Tmdb=info.getProperty('tmdb_id'), tipo='movie' if mode == 'movie' else 'tv').result.get("images", {})
+ for key, value in list(images.items()):
+ if not value: images.pop(key)
+ ImagesWindow(tmdb = images).doModal()
elif control_id in [ACTORS, CAST]:
self.close()
Main(self.getControl(self.getFocusId()).getSelectedItem())
@@ -346,7 +354,7 @@ class TrailerWindow(xbmcgui.WindowXMLDialog):
elif action in [EXIT]:
self.close()
-class images(xbmcgui.WindowDialog):
+class ImagesWindow(xbmcgui.WindowDialog):
def __init__(self, *args, **kwargs):
self.tmdb = kwargs.get("tmdb", {})
self.imdb = kwargs.get("imdb", {})
@@ -371,47 +379,61 @@ class images(xbmcgui.WindowDialog):
self.main_image = xbmcgui.ControlImage(0, 0, 1280, 720, main_image, 2)
self.addControl(self.main_image)
+ if self.image_list:
+ self.counter = xbmcgui.ControlTextBox(1180, 640, 60, 40, 'font30_title')
+ self.addControl(self.counter)
+ self.counter.setText('%s/%s' % (1,len(self.image_list)))
+ else:
+ self.text = xbmcgui.ControlLabel(0, 0, 1280, 720, 'NESSUNA IMMAGINE', 'font30_title', alignment=2|4)
+ self.addControl(self.text)
+
self.close_btn = xbmcgui.ControlButton(0, 0, 1280, 720, '' ,'', '')
self.addControl(self.close_btn)
- # BUTTON LEFT
- self.btn_left = xbmcgui.ControlButton(0, 330, 60, 60, '', imagepath('previous_focus'), imagepath('previous_nofocus'))
- self.addControl(self.btn_left)
- self.btn_left.setAnimations([('WindowOpen', 'effect=slide start=-60,0 end=0,0 delay=100 time=200'),('WindowClose', 'effect=slide start=0,0 end=-60,0 delay=100 time=200')])
+ if len(self.image_list) > 1:
+ # BUTTON LEFT
+ self.btn_left = xbmcgui.ControlButton(0, 330, 60, 60, '', imagepath('previous_focus'), imagepath('previous_nofocus'))
+ self.addControl(self.btn_left)
+ self.btn_left.setAnimations([('WindowOpen', 'effect=slide start=-60,0 end=0,0 delay=100 time=200'),('WindowClose', 'effect=slide start=0,0 end=-60,0 delay=100 time=200')])
- # BUTTON RIGHT
- self.btn_right = xbmcgui.ControlButton(1220, 330, 60, 60, '', imagepath('next_focus'), imagepath('next_nofocus'))
- self.addControl(self.btn_right)
- self.btn_right.setAnimations([('WindowOpen', 'effect=slide start=60,0 end=0,0 delay=100 time=200'),('WindowClose', 'effect=slide start=0,0 end=60,0 delay=100 time=200')])
+ # BUTTON RIGHT
+ self.btn_right = xbmcgui.ControlButton(1220, 330, 60, 60, '', imagepath('next_focus'), imagepath('next_nofocus'))
+ self.addControl(self.btn_right)
+ self.btn_right.setAnimations([('WindowOpen', 'effect=slide start=60,0 end=0,0 delay=100 time=200'),('WindowClose', 'effect=slide start=0,0 end=60,0 delay=100 time=200')])
- self.count = 0
+ self.count = 0
def onAction(self, action):
if action in [BACKSPACE, EXIT]:
self.close()
+ if len(self.image_list) > 1:
+ if action in [RIGHT, DOWN]:
+ self.count += 1
+ if self.count > len(self.image_list) -1: self.count = 0
+ self.main_image.setImage(self.image_list[self.count])
+ self.counter.setText('%s/%s' % (self.count,len(self.image_list)))
- if action in [RIGHT, DOWN]:
- self.count += 1
- if self.count > len(self.image_list) -1: self.count = 0
- self.main_image.setImage(self.image_list[self.count])
-
- if action in [LEFT, UP]:
- self.count -= 1
- if self.count < 0: self.count = len(self.image_list) -1
- self.main_image.setImage(self.image_list[self.count])
+ if action in [LEFT, UP]:
+ self.count -= 1
+ if self.count < 0: self.count = len(self.image_list) -1
+ self.main_image.setImage(self.image_list[self.count])
+ self.counter.setText('%s/%s' % (self.count,len(self.image_list)))
def onControl(self, control):
- if control.getId() == self.btn_right.getId():
- self.count += 1
- if self.count > len(self.image_list) -1: self.count = 0
- self.main_image.setImage(self.image_list[self.count])
+ if len(self.image_list) > 1:
+ if control.getId() == self.btn_right.getId():
+ self.count += 1
+ if self.count > len(self.image_list) -1: self.count = 0
+ self.main_image.setImage(self.image_list[self.count])
- elif control.getId() == self.btn_left.getId():
- self.count -= 1
- if self.count < 0: self.count = len(self.image_list) -1
- self.main_image.setImage(self.image_list[self.count])
+ elif control.getId() == self.btn_left.getId():
+ self.count -= 1
+ if self.count < 0: self.count = len(self.image_list) -1
+ self.main_image.setImage(self.image_list[self.count])
+ else:
+ self.close()
else:
self.close()
diff --git a/platformcode/launcher.py b/platformcode/launcher.py
index 8bfcc231..9eb64d2c 100644
--- a/platformcode/launcher.py
+++ b/platformcode/launcher.py
@@ -125,6 +125,10 @@ def run(item=None):
from platformcode import infoplus
return infoplus.Main(item)
+ elif item.channel == "backup":
+ from platformcode import backup
+ return getattr(backup, item.action)(item)
+
elif item.channel == "shortcuts":
from platformcode import shortcuts
return getattr(shortcuts, item.action)(item)
diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py
index 609d2615..a1a9ac23 100644
--- a/platformcode/platformtools.py
+++ b/platformcode/platformtools.py
@@ -945,6 +945,13 @@ def set_player(item, xlistitem, mediaurl, view, strm, nfo_path=None, head_nfo=No
from platformcode import xbmc_videolibrary
xbmc_videolibrary.mark_auto_as_watched(item, nfo_path, head_nfo, item_nfo)
+ # for cases where the audio playback window appears in place of the video one
+ if item.focusOnVideoPlayer:
+ while is_playing and xbmcgui.getCurrentWindowId() != 12006:
+ continue
+ xbmc.sleep(500)
+ xbmcgui.Window(12005).show()
+
def torrent_client_installed(show_tuple=False):
# External plugins found in servers / torrent.json node clients
diff --git a/platformcode/xbmc_videolibrary.py b/platformcode/xbmc_videolibrary.py
index fb6ea365..ea0c7745 100644
--- a/platformcode/xbmc_videolibrary.py
+++ b/platformcode/xbmc_videolibrary.py
@@ -44,7 +44,7 @@ def mark_auto_as_watched(item, nfo_path=None, head_nfo=None, item_nfo=None):
while platformtools.is_playing():
actual_time = xbmc.Player().getTime()
total_time = xbmc.Player().getTotalTime()
- if item_nfo.played_time and item_nfo.played_time > actual_time > 1:
+ if item_nfo.played_time and xbmcgui.getCurrentWindowId() == 12005:
xbmc.Player().seekTime(item_nfo.played_time)
item_nfo.played_time = 0 # Fix for Slow Devices
diff --git a/resources/skins/Default/720p/InfoPlus.xml b/resources/skins/Default/720p/InfoPlus.xml
index 388018fe..89de92d5 100644
--- a/resources/skins/Default/720p/InfoPlus.xml
+++ b/resources/skins/Default/720p/InfoPlus.xml
@@ -309,8 +309,8 @@
25
25
50
- 240
- Control.HasFocus(30500) | Control.HasFocus(30006) | Control.HasFocus(30007) | Control.HasFocus(30008)
+ 300
+ Control.HasFocus(30500) | Control.HasFocus(30006) | Control.HasFocus(30007) | Control.HasFocus(30008) | Control.HasFocus(30013)
50
50
@@ -335,16 +335,26 @@
Infoplus/trailer.png
30500
30008
+ 30013
+
+
+ 180
+ 50
+ 50
+ Infoplus/fanart.png
+ Infoplus/fanart.png
+ 30500
+ 30007
30008
- 180
+ 240
50
50
Infoplus/search.png
Infoplus/search.png
30500
- 30007
+ 30013
30007
diff --git a/resources/skins/Default/media/Infoplus/fanart.png b/resources/skins/Default/media/Infoplus/fanart.png
new file mode 100644
index 00000000..790d1c28
Binary files /dev/null and b/resources/skins/Default/media/Infoplus/fanart.png differ
diff --git a/specials/community.py b/specials/community.py
index 53de1afb..b5ac7034 100644
--- a/specials/community.py
+++ b/specials/community.py
@@ -63,7 +63,7 @@ def show_channels(item):
itemlist.append(Item(channel=item.channel,
title=support.typo(channel['channel_name'],'bold'),
- url=channel['url'],
+ url=channel['url'] if 'url' in channel else path,
thumbnail=thumbnail,
fanart=fanart,
plot=plot,
diff --git a/specials/tvmoviedb.py b/specials/tvmoviedb.py
index 590c5af6..a8198422 100644
--- a/specials/tvmoviedb.py
+++ b/specials/tvmoviedb.py
@@ -1775,7 +1775,7 @@ def imagenes(item):
itemlist.append(Item(channel=item.channel, action="", thumbnail=thumb, fanart=fanart,
title=title, infoLabels=item.infoLabels))
else:
- imagesWindow = infoplus.images(tmdb=value).doModal()
+ imagesWindow = infoplus.ImagesWindow(tmdb=value).doModal()
elif key == "fanart.tv":
if item.folder:
@@ -1787,7 +1787,7 @@ def imagenes(item):
itemlist.append(Item(channel=item.channel, action="", thumbnail=thumb, fanart=fanart,
title=title, infoLabels=item.infoLabels))
else:
- imagesWindow = infoplus.images(fanartv=value).doModal()
+ imagesWindow = infoplus.ImagesWindow(fanartv=value).doModal()
# elif key == "filmaffinity" and "Filmaffinity" in item.title:
# if item.folder:
@@ -1808,7 +1808,7 @@ def imagenes(item):
Item(channel=item.channel, action="", thumbnail=thumb, fanart=fanart, title=title,
infoLabels=item.infoLabels))
else:
- imagesWindow = infoplus.images(imdb=value).doModal()
+ imagesWindow = infoplus.ImagesWindow(imdb=value).doModal()
elif key == "myanimelist" and "MyAnimeList" in item.title:
if item.folder:
@@ -1817,7 +1817,7 @@ def imagenes(item):
Item(channel=item.channel, action="", thumbnail=imagen, fanart=imagen, title=title,
infoLabels=item.infoLabels))
else:
- imagesWindow = infoplus.images(mal=value).doModal()
+ imagesWindow = infoplus.ImagesWindow(mal=value).doModal()
return itemlist