- 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:
|
||||
# 1. aggiunto pagination e sistemate alcune voci
|
||||
# 2. modificato problemi in eccezioni
|
||||
# 3. aggiunta la def select
|
||||
# 3. aggiunta la def check
|
||||
# 4. modifica alla legenda e altre aggiunte
|
||||
|
||||
# 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
|
||||
# e la ricerca porta i titoli mischiati senza poterli distinguere tra loro
|
||||
# andranno modificate anche le def peliculas e episodios ove occorre
|
||||
def select(item):
|
||||
def check(item):
|
||||
support.info('select --->', item)
|
||||
#support.dbg()
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "altadefinizione",
|
||||
"name": "Altadefinizione",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": false,
|
||||
"active": true,
|
||||
"thumbnail": "altadefinizione.png",
|
||||
"banner": "altadefinizione.png",
|
||||
"categories": ["movie", "tvshow", "vos"],
|
||||
|
||||
@@ -20,7 +20,8 @@ headers = [['Referer', host]]
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = [('Al Cinema', ['/al-cinema/', 'peliculas']),
|
||||
film = ['/genere/film/',
|
||||
('Al Cinema', ['/al-cinema/', 'peliculas']),
|
||||
('Generi', ['', 'genres']),
|
||||
('Sub-ITA', ['/sub-ita/', 'peliculas'])]
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ def genres(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def select(item):
|
||||
def check(item):
|
||||
item.data = support.match(item).data
|
||||
if 'continua con il video' in item.data.lower():
|
||||
support.info('select = ### è un film ###')
|
||||
@@ -101,7 +101,7 @@ def peliculas(item):
|
||||
action = 'episodios'
|
||||
pagination = ''
|
||||
else:
|
||||
action = 'select'
|
||||
action = 'check'
|
||||
|
||||
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>[^<]+)))?'
|
||||
|
||||
@@ -128,7 +128,7 @@ def episodios(item):
|
||||
if ep not in episodes:
|
||||
episodes[ep] = []
|
||||
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 = {}
|
||||
|
||||
# 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\-]+)\))?'
|
||||
|
||||
if item.args == 'search':
|
||||
action = 'select'
|
||||
action = 'check'
|
||||
elif item.contentType == 'tvshow':
|
||||
action = 'episodios'
|
||||
elif item.contentType == 'movie':
|
||||
action ='findvideos'
|
||||
else:
|
||||
action = 'select'
|
||||
action = 'check'
|
||||
|
||||
def itemHook(item):
|
||||
item.title = item.title.replace(' - La Serie', '')
|
||||
@@ -97,7 +97,7 @@ def genres(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def select(item):
|
||||
def check(item):
|
||||
support.info()
|
||||
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
|
||||
|
||||
@@ -17,7 +17,7 @@ else:
|
||||
from urllib import urlencode
|
||||
|
||||
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 lib import unshortenit
|
||||
from platformcode import config
|
||||
@@ -1240,7 +1240,7 @@ def pagination(itemlist, item, page, perpage, function_level=1):
|
||||
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()
|
||||
|
||||
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)
|
||||
|
||||
# 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')
|
||||
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)
|
||||
|
||||
if Videolibrary and item.contentChannel != 'videolibrary':
|
||||
|
||||
@@ -1869,10 +1869,10 @@ def serverWindow(item, itemlist):
|
||||
self.setFocusId(100)
|
||||
# from core.support import dbg;dbg()
|
||||
|
||||
def onFocus(self, control):
|
||||
if is_playing() and db['controls'].get('reopen', False):
|
||||
self.close()
|
||||
serverWindow(self.item, self.itemlist)
|
||||
# def onFocus(self, control):
|
||||
# if is_playing() and db['controls'].get('reopen', False):
|
||||
# self.close()
|
||||
# serverWindow(self.item, self.itemlist)
|
||||
|
||||
def onAction(self, action):
|
||||
action = action.getId()
|
||||
@@ -1965,10 +1965,10 @@ def serverWindow(item, itemlist):
|
||||
self.SERVERS.addItems(items)
|
||||
self.setFocus(self.SERVERS)
|
||||
|
||||
def onFocus(self, control):
|
||||
if is_playing() and db['controls'].get('reopen', False):
|
||||
self.close()
|
||||
serverWindow(self.item, self.itemlist)
|
||||
# def onFocus(self, control):
|
||||
# if is_playing() and db['controls'].get('reopen', False):
|
||||
# self.close()
|
||||
# serverWindow(self.item, self.itemlist)
|
||||
|
||||
def onAction(self, action):
|
||||
action = action.getId()
|
||||
@@ -2010,8 +2010,13 @@ def serverWindow(item, 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():
|
||||
if not is_playing():
|
||||
if reopen:
|
||||
@@ -2036,7 +2041,6 @@ def serverWindow(item, itemlist):
|
||||
reopen = False
|
||||
if not selection.server or selection.server == 'torrent': break
|
||||
|
||||
db.close()
|
||||
logger.debug('Server Window EXIT')
|
||||
import threading
|
||||
threading.Thread(target=monitor, args=[itemlist]).start()
|
||||
# import threading
|
||||
monitor(itemlist, reopen)
|
||||
# threading.Thread(target=monitor, args=[itemlist, reopen]).start()
|
||||
|
||||
@@ -85,7 +85,10 @@ def mark_auto_as_watched(item):
|
||||
if marked:
|
||||
logger.debug('CLOSE')
|
||||
item.played_time = 0
|
||||
db['controls']['reopen'] = False
|
||||
if total_time > 20:
|
||||
db['controls']['reopen'] = False
|
||||
else:
|
||||
db['controls']['reopen'] = True
|
||||
else:
|
||||
logger.debug('REOPEN')
|
||||
item.played_time = actual_time
|
||||
@@ -110,7 +113,7 @@ def mark_auto_as_watched(item):
|
||||
|
||||
def sync_trakt_addon(path_folder):
|
||||
"""
|
||||
Updates the values of episodes seen if
|
||||
Updates the values of episodes seen if
|
||||
"""
|
||||
logger.debug()
|
||||
# if the addon exists we do the search
|
||||
|
||||
@@ -12,7 +12,7 @@ def test_video_exists(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'
|
||||
else:
|
||||
data = response.text
|
||||
|
||||
@@ -763,7 +763,7 @@ class SearchWindow(xbmcgui.WindowXML):
|
||||
context = [c[0] 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)
|
||||
if index > 0: xbmc.executebuiltin(context_commands[index])
|
||||
if index > -1: xbmc.executebuiltin(context_commands[index])
|
||||
|
||||
|
||||
def play(self, server=None):
|
||||
|
||||
@@ -260,12 +260,14 @@ def servers_blacklist(item):
|
||||
list_servers.append(server)
|
||||
ris = platformtools.dialog_multiselect(config.get_localized_string(60550), list_controls, preselect=blacklisted)
|
||||
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")
|
||||
|
||||
|
||||
def cb_servers_blacklist(dict_values):
|
||||
blaklisted = [k for k in dict_values.keys()]
|
||||
# def cb_servers_blacklist(dict_values):
|
||||
# blaklisted = [k for k in dict_values.keys()]
|
||||
# progreso = platformtools.dialog_progress(config.get_localized_string(60557), config.get_localized_string(60558))
|
||||
# n = len(dict_values)
|
||||
# i = 1
|
||||
|
||||
@@ -343,7 +343,6 @@ def get_episodes(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
from core import autoplay
|
||||
from platformcode import platformtools
|
||||
|
||||
logger.debug()
|
||||
@@ -553,9 +552,9 @@ def findvideos(item):
|
||||
|
||||
# logger.debug("server:\n%s" % server.tostring('\n'))
|
||||
itemlist.append(server)
|
||||
|
||||
if autoplay.play_multi_channel(item, itemlist): # hideserver
|
||||
return []
|
||||
# from core.support import dbg;dbg()
|
||||
# if autoplay.play_multi_channel(item, itemlist): # hideserver
|
||||
# return []
|
||||
|
||||
add_download_items(item, itemlist)
|
||||
return itemlist
|
||||
|
||||
Reference in New Issue
Block a user