- Aggiunto Canale Altadefinizione
- Fix Aggiungi alla Videoteca da Ricerca Globale - Miglior gestione riapertura finestra server - Fix Gestione server Bloccati
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
# fix:
|
# fix:
|
||||||
# 1. aggiunto pagination e sistemate alcune voci
|
# 1. aggiunto pagination e sistemate alcune voci
|
||||||
# 2. modificato problemi in eccezioni
|
# 2. modificato problemi in eccezioni
|
||||||
# 3. aggiunta la def select
|
# 3. aggiunta la def check
|
||||||
# 4. modifica alla legenda e altre aggiunte
|
# 4. modifica alla legenda e altre aggiunte
|
||||||
|
|
||||||
# Questo vuole solo essere uno scheletro per velocizzare la scrittura di un canale.
|
# Questo vuole solo essere uno scheletro per velocizzare la scrittura di un canale.
|
||||||
@@ -197,7 +197,7 @@ def genres(item):
|
|||||||
# per quei casi dove il sito non differenzia film e/o serie e/o anime
|
# per quei casi dove il sito non differenzia film e/o serie e/o anime
|
||||||
# e la ricerca porta i titoli mischiati senza poterli distinguere tra loro
|
# e la ricerca porta i titoli mischiati senza poterli distinguere tra loro
|
||||||
# andranno modificate anche le def peliculas e episodios ove occorre
|
# andranno modificate anche le def peliculas e episodios ove occorre
|
||||||
def select(item):
|
def check(item):
|
||||||
support.info('select --->', item)
|
support.info('select --->', item)
|
||||||
#support.dbg()
|
#support.dbg()
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"id": "altadefinizione",
|
"id": "altadefinizione",
|
||||||
"name": "Altadefinizione",
|
"name": "Altadefinizione",
|
||||||
"language": ["ita", "sub-ita"],
|
"language": ["ita", "sub-ita"],
|
||||||
"active": false,
|
"active": true,
|
||||||
"thumbnail": "altadefinizione.png",
|
"thumbnail": "altadefinizione.png",
|
||||||
"banner": "altadefinizione.png",
|
"banner": "altadefinizione.png",
|
||||||
"categories": ["movie", "tvshow", "vos"],
|
"categories": ["movie", "tvshow", "vos"],
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ headers = [['Referer', host]]
|
|||||||
@support.menu
|
@support.menu
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
|
|
||||||
film = [('Al Cinema', ['/al-cinema/', 'peliculas']),
|
film = ['/genere/film/',
|
||||||
|
('Al Cinema', ['/al-cinema/', 'peliculas']),
|
||||||
('Generi', ['', 'genres']),
|
('Generi', ['', 'genres']),
|
||||||
('Sub-ITA', ['/sub-ita/', 'peliculas'])]
|
('Sub-ITA', ['/sub-ita/', 'peliculas'])]
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ def genres(item):
|
|||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
def select(item):
|
def check(item):
|
||||||
item.data = support.match(item).data
|
item.data = support.match(item).data
|
||||||
if 'continua con il video' in item.data.lower():
|
if 'continua con il video' in item.data.lower():
|
||||||
support.info('select = ### è un film ###')
|
support.info('select = ### è un film ###')
|
||||||
@@ -101,7 +101,7 @@ def peliculas(item):
|
|||||||
action = 'episodios'
|
action = 'episodios'
|
||||||
pagination = ''
|
pagination = ''
|
||||||
else:
|
else:
|
||||||
action = 'select'
|
action = 'check'
|
||||||
|
|
||||||
if item.args == 'newest':
|
if item.args == 'newest':
|
||||||
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>[sS]ub-[iI][tT][aA])?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?'
|
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>[sS]ub-[iI][tT][aA])?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?'
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ def episodios(item):
|
|||||||
if ep not in episodes:
|
if ep not in episodes:
|
||||||
episodes[ep] = []
|
episodes[ep] = []
|
||||||
episodes[ep].append(s)
|
episodes[ep].append(s)
|
||||||
servers = support.server(item, it.stagione, AutoPlay=False, CheckLinks=False, Download=False, Videolibrary=False)
|
servers = support.server(item, it.stagione, CheckLinks=False, Download=False, Videolibrary=False)
|
||||||
episodes = {}
|
episodes = {}
|
||||||
|
|
||||||
# ottengo l'episodio dal nome del file
|
# ottengo l'episodio dal nome del file
|
||||||
|
|||||||
@@ -48,13 +48,13 @@ def peliculas(item):
|
|||||||
patron = r'<li>\s?<a href="(?P<url>[^"]+)" data-thumbnail="(?P<thumb>[^"]+)">.*?<div class="title[^"]*">(?P<title>.+?)(?:\s\[(?P<quality>HD)\])?<\/div>\s*<div class="episode[^"]*"[^>]+>(?P<episode>[^<(]+)(?:\((?P<lang>[a-zA-Z\-]+)\))?'
|
patron = r'<li>\s?<a href="(?P<url>[^"]+)" data-thumbnail="(?P<thumb>[^"]+)">.*?<div class="title[^"]*">(?P<title>.+?)(?:\s\[(?P<quality>HD)\])?<\/div>\s*<div class="episode[^"]*"[^>]+>(?P<episode>[^<(]+)(?:\((?P<lang>[a-zA-Z\-]+)\))?'
|
||||||
|
|
||||||
if item.args == 'search':
|
if item.args == 'search':
|
||||||
action = 'select'
|
action = 'check'
|
||||||
elif item.contentType == 'tvshow':
|
elif item.contentType == 'tvshow':
|
||||||
action = 'episodios'
|
action = 'episodios'
|
||||||
elif item.contentType == 'movie':
|
elif item.contentType == 'movie':
|
||||||
action ='findvideos'
|
action ='findvideos'
|
||||||
else:
|
else:
|
||||||
action = 'select'
|
action = 'check'
|
||||||
|
|
||||||
def itemHook(item):
|
def itemHook(item):
|
||||||
item.title = item.title.replace(' - La Serie', '')
|
item.title = item.title.replace(' - La Serie', '')
|
||||||
@@ -97,7 +97,7 @@ def genres(item):
|
|||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
def select(item):
|
def check(item):
|
||||||
support.info()
|
support.info()
|
||||||
patron=r'class="taxonomy category"\s*><span property="name">([^>]+)</span></a><meta property="position" content="2">'
|
patron=r'class="taxonomy category"\s*><span property="name">([^>]+)</span></a><meta property="position" content="2">'
|
||||||
block = support.match(item.url, patron=patron,headers=headers).match
|
block = support.match(item.url, patron=patron,headers=headers).match
|
||||||
|
|||||||
+3
-11
@@ -17,7 +17,7 @@ else:
|
|||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
|
|
||||||
from time import time
|
from time import time
|
||||||
from core import filetools, httptools, scrapertools, servertools, tmdb, channeltools, autoplay, scraper
|
from core import filetools, httptools, scrapertools, servertools, tmdb, channeltools
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from lib import unshortenit
|
from lib import unshortenit
|
||||||
from platformcode import config
|
from platformcode import config
|
||||||
@@ -1240,7 +1240,7 @@ def pagination(itemlist, item, page, perpage, function_level=1):
|
|||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True, Download=True, patronTag=None, Videolibrary=True):
|
def server(item, data='', itemlist=[], headers='', CheckLinks=True, Download=True, patronTag=None, Videolibrary=True):
|
||||||
logger.debug()
|
logger.debug()
|
||||||
|
|
||||||
if not data and not itemlist:
|
if not data and not itemlist:
|
||||||
@@ -1318,18 +1318,10 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
|||||||
addQualityTag(item, verifiedItemlist, data, patronTag)
|
addQualityTag(item, verifiedItemlist, data, patronTag)
|
||||||
|
|
||||||
# Check Links
|
# Check Links
|
||||||
if not item.global_search and config.get_setting('checklinks') and CheckLinks and not config.get_setting('autoplay'):
|
if not item.global_search and config.get_setting('checklinks') and CheckLinks: # and not config.get_setting('autoplay'):
|
||||||
checklinks_number = config.get_setting('checklinks_number')
|
checklinks_number = config.get_setting('checklinks_number')
|
||||||
verifiedItemlist = servertools.check_list_links(verifiedItemlist, checklinks_number)
|
verifiedItemlist = servertools.check_list_links(verifiedItemlist, checklinks_number)
|
||||||
|
|
||||||
try:
|
|
||||||
if AutoPlay and item.contentChannel not in ['downloads', 'videolibrary']:
|
|
||||||
autoplay.start(verifiedItemlist, item)
|
|
||||||
except:
|
|
||||||
import traceback
|
|
||||||
logger.error(traceback.format_exc())
|
|
||||||
pass
|
|
||||||
|
|
||||||
verifiedItemlist = servertools.sort_servers(verifiedItemlist)
|
verifiedItemlist = servertools.sort_servers(verifiedItemlist)
|
||||||
|
|
||||||
if Videolibrary and item.contentChannel != 'videolibrary':
|
if Videolibrary and item.contentChannel != 'videolibrary':
|
||||||
|
|||||||
@@ -1869,10 +1869,10 @@ def serverWindow(item, itemlist):
|
|||||||
self.setFocusId(100)
|
self.setFocusId(100)
|
||||||
# from core.support import dbg;dbg()
|
# from core.support import dbg;dbg()
|
||||||
|
|
||||||
def onFocus(self, control):
|
# def onFocus(self, control):
|
||||||
if is_playing() and db['controls'].get('reopen', False):
|
# if is_playing() and db['controls'].get('reopen', False):
|
||||||
self.close()
|
# self.close()
|
||||||
serverWindow(self.item, self.itemlist)
|
# serverWindow(self.item, self.itemlist)
|
||||||
|
|
||||||
def onAction(self, action):
|
def onAction(self, action):
|
||||||
action = action.getId()
|
action = action.getId()
|
||||||
@@ -1965,10 +1965,10 @@ def serverWindow(item, itemlist):
|
|||||||
self.SERVERS.addItems(items)
|
self.SERVERS.addItems(items)
|
||||||
self.setFocus(self.SERVERS)
|
self.setFocus(self.SERVERS)
|
||||||
|
|
||||||
def onFocus(self, control):
|
# def onFocus(self, control):
|
||||||
if is_playing() and db['controls'].get('reopen', False):
|
# if is_playing() and db['controls'].get('reopen', False):
|
||||||
self.close()
|
# self.close()
|
||||||
serverWindow(self.item, self.itemlist)
|
# serverWindow(self.item, self.itemlist)
|
||||||
|
|
||||||
def onAction(self, action):
|
def onAction(self, action):
|
||||||
action = action.getId()
|
action = action.getId()
|
||||||
@@ -2010,8 +2010,13 @@ def serverWindow(item, itemlist):
|
|||||||
|
|
||||||
|
|
||||||
if itemlist:
|
if itemlist:
|
||||||
def monitor(itemlist):
|
reopen = False
|
||||||
reopen = False
|
if config.get_setting('autoplay'):
|
||||||
|
reopen = True
|
||||||
|
from core import autoplay
|
||||||
|
autoplay.start(itemlist, item)
|
||||||
|
|
||||||
|
def monitor(itemlist, reopen):
|
||||||
while not xbmc.Monitor().abortRequested():
|
while not xbmc.Monitor().abortRequested():
|
||||||
if not is_playing():
|
if not is_playing():
|
||||||
if reopen:
|
if reopen:
|
||||||
@@ -2036,7 +2041,6 @@ def serverWindow(item, itemlist):
|
|||||||
reopen = False
|
reopen = False
|
||||||
if not selection.server or selection.server == 'torrent': break
|
if not selection.server or selection.server == 'torrent': break
|
||||||
|
|
||||||
db.close()
|
# import threading
|
||||||
logger.debug('Server Window EXIT')
|
monitor(itemlist, reopen)
|
||||||
import threading
|
# threading.Thread(target=monitor, args=[itemlist, reopen]).start()
|
||||||
threading.Thread(target=monitor, args=[itemlist]).start()
|
|
||||||
|
|||||||
@@ -85,7 +85,10 @@ def mark_auto_as_watched(item):
|
|||||||
if marked:
|
if marked:
|
||||||
logger.debug('CLOSE')
|
logger.debug('CLOSE')
|
||||||
item.played_time = 0
|
item.played_time = 0
|
||||||
db['controls']['reopen'] = False
|
if total_time > 20:
|
||||||
|
db['controls']['reopen'] = False
|
||||||
|
else:
|
||||||
|
db['controls']['reopen'] = True
|
||||||
else:
|
else:
|
||||||
logger.debug('REOPEN')
|
logger.debug('REOPEN')
|
||||||
item.played_time = actual_time
|
item.played_time = actual_time
|
||||||
@@ -110,7 +113,7 @@ def mark_auto_as_watched(item):
|
|||||||
|
|
||||||
def sync_trakt_addon(path_folder):
|
def sync_trakt_addon(path_folder):
|
||||||
"""
|
"""
|
||||||
Updates the values of episodes seen if
|
Updates the values of episodes seen if
|
||||||
"""
|
"""
|
||||||
logger.debug()
|
logger.debug()
|
||||||
# if the addon exists we do the search
|
# if the addon exists we do the search
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ def test_video_exists(page_url):
|
|||||||
|
|
||||||
response = scraper.get(page_url)
|
response = scraper.get(page_url)
|
||||||
|
|
||||||
if response.status_code == 404 or 'File you are looking for is not found' in response.text:
|
if response.status_code == 404 or 'Not Found' in response.text:
|
||||||
return False, config.get_localized_string(70449) % 'DooD Stream'
|
return False, config.get_localized_string(70449) % 'DooD Stream'
|
||||||
else:
|
else:
|
||||||
data = response.text
|
data = response.text
|
||||||
|
|||||||
@@ -763,7 +763,7 @@ class SearchWindow(xbmcgui.WindowXML):
|
|||||||
context = [c[0] for c in commands]
|
context = [c[0] for c in commands]
|
||||||
context_commands = [c[1].replace('Container.Refresh', 'RunPlugin').replace('Container.Update', 'RunPlugin') for c in commands]
|
context_commands = [c[1].replace('Container.Refresh', 'RunPlugin').replace('Container.Update', 'RunPlugin') for c in commands]
|
||||||
index = xbmcgui.Dialog().contextmenu(context)
|
index = xbmcgui.Dialog().contextmenu(context)
|
||||||
if index > 0: xbmc.executebuiltin(context_commands[index])
|
if index > -1: xbmc.executebuiltin(context_commands[index])
|
||||||
|
|
||||||
|
|
||||||
def play(self, server=None):
|
def play(self, server=None):
|
||||||
|
|||||||
+5
-3
@@ -260,12 +260,14 @@ def servers_blacklist(item):
|
|||||||
list_servers.append(server)
|
list_servers.append(server)
|
||||||
ris = platformtools.dialog_multiselect(config.get_localized_string(60550), list_controls, preselect=blacklisted)
|
ris = platformtools.dialog_multiselect(config.get_localized_string(60550), list_controls, preselect=blacklisted)
|
||||||
if ris is not None:
|
if ris is not None:
|
||||||
cb_servers_blacklist({list_servers[n]: True if n in ris else False for n, it in enumerate(list_controls)})
|
config.set_setting("black_list", [l for n, l in enumerate(list_servers) if n in ris], server='servers')
|
||||||
|
# if ris is not None:
|
||||||
|
# cb_servers_blacklist({list_servers[n]: True if n in ris else False for n, it in enumerate(list_controls)})
|
||||||
# return platformtools.show_channel_settings(list_controls=list_controls, dict_values=dict_values, caption=config.get_localized_string(60550), callback="cb_servers_blacklist")
|
# return platformtools.show_channel_settings(list_controls=list_controls, dict_values=dict_values, caption=config.get_localized_string(60550), callback="cb_servers_blacklist")
|
||||||
|
|
||||||
|
|
||||||
def cb_servers_blacklist(dict_values):
|
# def cb_servers_blacklist(dict_values):
|
||||||
blaklisted = [k for k in dict_values.keys()]
|
# blaklisted = [k for k in dict_values.keys()]
|
||||||
# progreso = platformtools.dialog_progress(config.get_localized_string(60557), config.get_localized_string(60558))
|
# progreso = platformtools.dialog_progress(config.get_localized_string(60557), config.get_localized_string(60558))
|
||||||
# n = len(dict_values)
|
# n = len(dict_values)
|
||||||
# i = 1
|
# i = 1
|
||||||
|
|||||||
@@ -343,7 +343,6 @@ def get_episodes(item):
|
|||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
from core import autoplay
|
|
||||||
from platformcode import platformtools
|
from platformcode import platformtools
|
||||||
|
|
||||||
logger.debug()
|
logger.debug()
|
||||||
@@ -553,9 +552,9 @@ def findvideos(item):
|
|||||||
|
|
||||||
# logger.debug("server:\n%s" % server.tostring('\n'))
|
# logger.debug("server:\n%s" % server.tostring('\n'))
|
||||||
itemlist.append(server)
|
itemlist.append(server)
|
||||||
|
# from core.support import dbg;dbg()
|
||||||
if autoplay.play_multi_channel(item, itemlist): # hideserver
|
# if autoplay.play_multi_channel(item, itemlist): # hideserver
|
||||||
return []
|
# return []
|
||||||
|
|
||||||
add_download_items(item, itemlist)
|
add_download_items(item, itemlist)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
Reference in New Issue
Block a user