- Fix Raiplay
- Fix Animesaturn - Fix Animeuniverse - Alcuni Fix alla riproduzione
This commit is contained in:
@@ -169,7 +169,7 @@ def findvideos(item):
|
||||
page_data += data
|
||||
if link and link not in links:
|
||||
links.append(link)
|
||||
link += '|Referer=' + item.url
|
||||
# link += '|Referer=' + item.url
|
||||
itemlist.append(item.clone(action="play", title=titles[i], url=link, server='directo'))
|
||||
return support.server(item, data=data, itemlist=itemlist)
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ def peliculas(item):
|
||||
itm.fulltitle = itm.show = itm.contentSerieName = title
|
||||
itm.action = 'episodios'
|
||||
itm.episodes = it['episodes'] if 'episodes' in it else it['link']
|
||||
itm.url = ''
|
||||
itm.url = item.url
|
||||
|
||||
itemlist.append(itm)
|
||||
|
||||
@@ -221,4 +221,7 @@ def episodios(item):
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
return support.server(item,itemlist=[item.clone(title=support.config.get_localized_string(30137), server='directo', action='play')])
|
||||
if not 'vvvvid' in item.url:
|
||||
return support.server(item,itemlist=[item.clone(title=support.config.get_localized_string(30137), server='directo', action='play')])
|
||||
else:
|
||||
return support.server(item, item.url)
|
||||
@@ -34,8 +34,8 @@ def mainlist(item):
|
||||
|
||||
|
||||
def live(item):
|
||||
itemlist = [item.clone(title=support.typo('La7', 'bold'), fulltitle='La7', url= host + '/dirette-tv', action='play', forcethumb = True),
|
||||
item.clone(title=support.typo('La7d', 'bold'), fulltitle='La7d', url= host + '/live-la7d', action='play', forcethumb = True)]
|
||||
itemlist = [item.clone(title=support.typo('La7', 'bold'), fulltitle='La7', url= host + '/dirette-tv', action='play', forcethumb = True, no_return=True),
|
||||
item.clone(title=support.typo('La7d', 'bold'), fulltitle='La7d', url= host + '/live-la7d', action='play', forcethumb = True, no_return=True)]
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
|
||||
|
||||
@@ -96,7 +96,8 @@ def live(item):
|
||||
forcethumb = True,
|
||||
urls=urls,
|
||||
plot=plot,
|
||||
action='play'))
|
||||
action='play',
|
||||
no_return=True))
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
def peliculas(item):
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import requests, sys, inspect
|
||||
from core import support
|
||||
from platformcode import autorenumber
|
||||
from platformcode import autorenumber, logger
|
||||
if sys.version_info[0] >= 3:
|
||||
from concurrent import futures
|
||||
else:
|
||||
@@ -141,6 +141,7 @@ def search(item, text):
|
||||
|
||||
|
||||
def Type(item):
|
||||
logger.debug(item.url)
|
||||
json = current_session.get(item.url).json()
|
||||
if json['program_info']['layout'] == 'single':
|
||||
item.contentTitle = item.fulltitle
|
||||
@@ -168,7 +169,7 @@ def live(item):
|
||||
channel = key['channel']
|
||||
itemlist.append(item.clone(title = support.typo(channel, 'bold'), fulltitle = channel, show = channel, url = key['video']['contentUrl'],
|
||||
thumbnail = key['transparent-icon'].replace("[RESOLUTION]", "256x-"), forcethumb = True , fanart = info[channel]['fanart'],
|
||||
plot = info[channel]['plot'], action = 'play'))
|
||||
plot = info[channel]['plot'], action = 'play', no_return=True))
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
|
||||
@@ -223,6 +224,7 @@ def peliculas(item):
|
||||
def select(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
# support.dbg()
|
||||
if type(item.url) in [list, dict]:
|
||||
json = item.url
|
||||
else:
|
||||
@@ -235,10 +237,12 @@ def select(item):
|
||||
if not season.isdigit(): season = ''
|
||||
itemlist.append(item.clone(title = support.typo(key['name'],'bold'), season = season, url = key['sets'], action = 'select'))
|
||||
if len(itemlist) == 1:
|
||||
return episodios(itemlist[0])
|
||||
return select(itemlist[0])
|
||||
else:
|
||||
for key in item.url:
|
||||
itemlist.append(item.clone(title = support.typo(key['name'], 'bold'), url = getUrl(key['path_id']), contentType = 'tvshow', action = 'episodios'))
|
||||
itemlist.append(item.clone(title = support.typo(key['name'], 'bold'), data = getUrl(key['path_id']), url = getUrl(key['path_id']), contentType = 'tvshow', action = 'episodios'))
|
||||
if len(itemlist) == 1:
|
||||
return episodios(itemlist[0])
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -260,6 +264,7 @@ def episodios(item):
|
||||
if itemlist and itemlist[0].VL:
|
||||
# itemlist.reverse()
|
||||
itemlist = sorted(itemlist, key=lambda it: it.order)
|
||||
item.action = 'episodios'
|
||||
support.videolibrary(itemlist, item)
|
||||
else:
|
||||
itemlist = sorted(itemlist, key=lambda it: it.title)
|
||||
@@ -297,6 +302,7 @@ def episodios(item):
|
||||
it.title = support.typo(item.season + 'x' + episode, 'bold') + (' - ' + it.title)
|
||||
|
||||
if itemlist and itemlist[0].VL: support.videolibrary(itemlist, item)
|
||||
|
||||
if itemlist and not support.match(itemlist[0].title, patron=r'[Ss]?(\d+)(?:x|_|\.|\s+)[Ee]?[Pp]?(\d+)').match and inspect.stack()[1][3] not in ['find_episodes']:
|
||||
autorenumber.start(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
@@ -463,20 +463,21 @@ def play_from_library(item):
|
||||
logger.debug()
|
||||
# logger.debug("item: \n" + item.tostring('\n'))
|
||||
|
||||
# Try to reproduce an image (this does nothing and also does not give an error)
|
||||
platformtools.prevent_busy(item)
|
||||
|
||||
# Modify the action (currently the video library needs "findvideos" since this is where the sources are searched
|
||||
# Modify the action (currently the video library needs "findvideos" since this is where the sources are searched
|
||||
item.action = "findvideos"
|
||||
|
||||
window_type = config.get_setting("window_type", "videolibrary")
|
||||
# and launch kodi again
|
||||
if xbmc.getCondVisibility('Window.IsMedia') and not window_type == 1:
|
||||
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4")))
|
||||
xbmc.Player().stop()
|
||||
# Conventional window
|
||||
item.window = True
|
||||
xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")")
|
||||
|
||||
else:
|
||||
# Pop-up window
|
||||
# platformtools.prevent_busy(item)
|
||||
from specials import videolibrary
|
||||
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683))
|
||||
p_dialog.update(0, '')
|
||||
@@ -489,7 +490,6 @@ def play_from_library(item):
|
||||
if nfo_path and filetools.isfile(nfo_path):
|
||||
from core import videolibrarytools
|
||||
head_nfo, item_nfo = videolibrarytools.read_nfo(nfo_path)
|
||||
item_nfo.window = True
|
||||
played_time = platformtools.get_played_time(item_nfo)
|
||||
else: played_time = 0
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@ from platformcode import logger, config
|
||||
addon = config.__settings__
|
||||
addon_icon = os.path.join( addon.getAddonInfo( "path" ),'resources', 'media', "logo.png" )
|
||||
|
||||
class XBMCPlayer(xbmc.Player):
|
||||
# class XBMCPlayer(xbmc.Player):
|
||||
|
||||
def __init__(self, *args):
|
||||
pass
|
||||
# def __init__(self, *args):
|
||||
# pass
|
||||
|
||||
|
||||
xbmc_player = XBMCPlayer()
|
||||
xbmc_player = xbmc.Player()
|
||||
|
||||
|
||||
def dialog_ok(heading, message):
|
||||
@@ -1037,14 +1037,18 @@ def set_player(item, xlistitem, mediaurl, view, strm):
|
||||
|
||||
if player_mode in [0,1]:
|
||||
prevent_busy(item)
|
||||
logger.info('Player Mode:' + ['Direct', 'Bookmark'][player_mode])
|
||||
if player_mode in [1]:
|
||||
item.played_time = resume_playback(get_played_time(item))
|
||||
item.options['continue'] = True
|
||||
|
||||
logger.info('Player Mode:',['Direct', 'Bookmark'][player_mode])
|
||||
# Add the listitem to a playlist
|
||||
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
||||
playlist.clear()
|
||||
playlist.add(mediaurl, xlistitem)
|
||||
# Reproduce
|
||||
xbmc_player.play(playlist, xlistitem)
|
||||
# viewed(item, played_time)
|
||||
|
||||
if config.get_setting('trakt_sync'):
|
||||
from core import trakt_tools
|
||||
trakt_tools.wait_for_update_trakt()
|
||||
@@ -1067,7 +1071,7 @@ 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 player_mode == 1: item.options['continue'] = True
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.mark_auto_as_watched(item)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ def mark_auto_as_watched(item):
|
||||
actual_time = 0
|
||||
total_time = 0
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
if item.options['continue']: item.played_time = platformtools.resume_playback(platformtools.get_played_time(item))
|
||||
# if item.options['continue']: item.played_time = platformtools.resume_playback(platformtools.get_played_time(item))
|
||||
|
||||
time_limit = time.time() + 30
|
||||
while not platformtools.is_playing() and time.time() < time_limit:
|
||||
@@ -91,7 +91,7 @@ def mark_auto_as_watched(item):
|
||||
|
||||
while platformtools.is_playing():
|
||||
xbmc.sleep(100)
|
||||
if not show_server and item.play_from != 'window':
|
||||
if not show_server and item.play_from != 'window' and not item.no_return:
|
||||
xbmc.sleep(700)
|
||||
xbmc.executebuiltin('Action(Back)')
|
||||
xbmc.sleep(500)
|
||||
|
||||
@@ -594,7 +594,7 @@ class SearchWindow(xbmcgui.WindowXMLDialog):
|
||||
busy(False)
|
||||
return
|
||||
|
||||
if item.action not in ['findvideos', 'episodios']: # special items (add to videolibrary, download ecc.)
|
||||
if item.action in ['add_pelicula_to_library', 'add_serie_to_library','save_download']: # special items (add to videolibrary, download ecc.)
|
||||
xbmc.executebuiltin("RunPlugin(plugin://plugin.video.kod/?" + item_url + ")")
|
||||
busy(False)
|
||||
return
|
||||
@@ -742,9 +742,9 @@ class SearchWindow(xbmcgui.WindowXMLDialog):
|
||||
|
||||
def playmonitor(self, server=None):
|
||||
if server:
|
||||
platformtools.prevent_busy(server)
|
||||
server.window = True
|
||||
server.globalsearch = True
|
||||
platformtools.prevent_busy(server)
|
||||
Thread(target=run, args=[server]).start()
|
||||
# run(server)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user