Merge branch 'master' of github.com:kodiondemand/addon
This commit is contained in:
+4
-1
@@ -802,7 +802,7 @@ def match(item_url_string, **args):
|
|||||||
match: first match
|
match: first match
|
||||||
matches: all the matches
|
matches: all the matches
|
||||||
'''
|
'''
|
||||||
log(item_url_string)
|
log()
|
||||||
|
|
||||||
matches = blocks = []
|
matches = blocks = []
|
||||||
url = None
|
url = None
|
||||||
@@ -1185,6 +1185,8 @@ def addQualityTag(item, itemlist, data, patron):
|
|||||||
"DLMux": "si tratta di un 720p o 1080p reperiti dalla versione americana di iTunes americano. La qualità è paragonabile a quella di un BluRayRip e permette di fruire di episodi televisivi, senza il fastidioso bollo distintivo della rete che trasmette.",
|
"DLMux": "si tratta di un 720p o 1080p reperiti dalla versione americana di iTunes americano. La qualità è paragonabile a quella di un BluRayRip e permette di fruire di episodi televisivi, senza il fastidioso bollo distintivo della rete che trasmette.",
|
||||||
"DVD5": "il film è in formato DVD Single Layer, nel quale vengono mantenute tutte le caratteristiche del DVD originale: tra queste il menu multilingue, i sottotitoli e i contenuti speciali, se presenti. Il video è codificato nel formato DVD originale MPEG-2.",
|
"DVD5": "il film è in formato DVD Single Layer, nel quale vengono mantenute tutte le caratteristiche del DVD originale: tra queste il menu multilingue, i sottotitoli e i contenuti speciali, se presenti. Il video è codificato nel formato DVD originale MPEG-2.",
|
||||||
"DVD9": "ha le stesse caratteristiche del DVD5, ma le dimensioni del file sono di un DVD Dual Layer (8,5 GB).",
|
"DVD9": "ha le stesse caratteristiche del DVD5, ma le dimensioni del file sono di un DVD Dual Layer (8,5 GB).",
|
||||||
|
"HDTS": "viene utilizzata una videocamera professionale ad alta definizione posizionata in modo fisso. La qualità audio video è buona.",
|
||||||
|
"DVDMUX": "indica una buona qualità video, l’audio è stato aggiunto da una sorgente diversa per una migliore qualità.",
|
||||||
}
|
}
|
||||||
|
|
||||||
defQualAudio = {
|
defQualAudio = {
|
||||||
@@ -1194,6 +1196,7 @@ def addQualityTag(item, itemlist, data, patron):
|
|||||||
"DD": "audio ricavato dai dischi DTS cinema. L’audio è di buona qualità, ma potreste riscontrare il fatto che non potrebbe essere più riproducibile.",
|
"DD": "audio ricavato dai dischi DTS cinema. L’audio è di buona qualità, ma potreste riscontrare il fatto che non potrebbe essere più riproducibile.",
|
||||||
"AC3": "audio in Dolby Digital puo' variare da 2.0 a 5.1 canali in alta qualità.",
|
"AC3": "audio in Dolby Digital puo' variare da 2.0 a 5.1 canali in alta qualità.",
|
||||||
"MP3": "codec per compressione audio utilizzato MP3.",
|
"MP3": "codec per compressione audio utilizzato MP3.",
|
||||||
|
"RESYNC": "il film è stato lavorato e re sincronizzato con una traccia audio. A volte potresti riscontrare una mancata sincronizzazione tra audio e video.",
|
||||||
}
|
}
|
||||||
qualityStr = scrapertools.find_single_match(data, patron).strip()
|
qualityStr = scrapertools.find_single_match(data, patron).strip()
|
||||||
if PY3:
|
if PY3:
|
||||||
|
|||||||
@@ -234,12 +234,54 @@ def save_movie(item):
|
|||||||
p_dialog.close()
|
p_dialog.close()
|
||||||
return 0, 0, -1
|
return 0, 0, -1
|
||||||
|
|
||||||
|
def update_renumber_options(item, head_nfo, path):
|
||||||
|
from core import jsontools
|
||||||
|
# from core.support import dbg;dbg()
|
||||||
|
tvshow_path = filetools.join(path, 'tvshow.nfo')
|
||||||
|
for channel in item.channel_prefs:
|
||||||
|
filename = filetools.join(config.get_data_path(), "settings_channels", channel + '_data.json')
|
||||||
|
|
||||||
|
json_file = jsontools.load(filetools.read(filename))
|
||||||
|
if 'TVSHOW_AUTORENUMBER' in json_file:
|
||||||
|
json = json_file['TVSHOW_AUTORENUMBER']
|
||||||
|
if item.fulltitle in json:
|
||||||
|
item.channel_prefs[channel]['TVSHOW_AUTORENUMBER'] = json[item.fulltitle]
|
||||||
|
logger.info('UPDATED=\n' + str(item.channel_prefs))
|
||||||
|
filetools.write(tvshow_path, head_nfo + item.tojson())
|
||||||
|
|
||||||
|
def add_renumber_options(item, head_nfo, path):
|
||||||
|
from core import jsontools
|
||||||
|
# from core.support import dbg;dbg()
|
||||||
|
ret = None
|
||||||
|
filename = filetools.join(config.get_data_path(), "settings_channels", item.channel + '_data.json')
|
||||||
|
json_file = jsontools.load(filetools.read(filename))
|
||||||
|
if 'TVSHOW_AUTORENUMBER' in json_file:
|
||||||
|
json = json_file['TVSHOW_AUTORENUMBER']
|
||||||
|
if item.fulltitle in json:
|
||||||
|
ret = json[item.fulltitle]
|
||||||
|
return ret
|
||||||
|
|
||||||
|
def check_renumber_options(item):
|
||||||
|
from specials.autorenumber import load, write
|
||||||
|
for key in item.channel_prefs:
|
||||||
|
if 'TVSHOW_AUTORENUMBER' in item.channel_prefs[key]:
|
||||||
|
item.channel = key
|
||||||
|
json = load(item)
|
||||||
|
if not json or item.fulltitle not in json:
|
||||||
|
json[item.fulltitle] = item.channel_prefs[key]['TVSHOW_AUTORENUMBER']
|
||||||
|
write(item, json)
|
||||||
|
|
||||||
|
# head_nfo, tvshow_item = read_nfo(filetools.join(item.context[0]['nfo']))
|
||||||
|
# if tvshow_item['channel_prefs'][item.fullti]
|
||||||
|
|
||||||
|
|
||||||
def filter_list(episodelist, action=None, path=None):
|
def filter_list(episodelist, action=None, path=None):
|
||||||
# if path: path = path.decode('utf8')
|
# if path: path = path.decode('utf8')
|
||||||
# import xbmc
|
# import xbmc
|
||||||
# if xbmc.getCondVisibility('system.platform.windows') > 0: path = path.replace('smb:','').replace('/','\\')
|
# if xbmc.getCondVisibility('system.platform.windows') > 0: path = path.replace('smb:','').replace('/','\\')
|
||||||
channel_prefs = {}
|
channel_prefs = {}
|
||||||
lang_sel = quality_sel = show_title = channel =''
|
lang_sel = quality_sel = show_title = channel =''
|
||||||
|
# from core.support import dbg;dbg()
|
||||||
if action:
|
if action:
|
||||||
tvshow_path = filetools.join(path, "tvshow.nfo")
|
tvshow_path = filetools.join(path, "tvshow.nfo")
|
||||||
head_nfo, tvshow_item = read_nfo(tvshow_path)
|
head_nfo, tvshow_item = read_nfo(tvshow_path)
|
||||||
@@ -253,8 +295,13 @@ def filter_list(episodelist, action=None, path=None):
|
|||||||
filetools.remove(filetools.join(path, File))
|
filetools.remove(filetools.join(path, File))
|
||||||
if channel not in tvshow_item.channel_prefs:
|
if channel not in tvshow_item.channel_prefs:
|
||||||
tvshow_item.channel_prefs[channel] = {}
|
tvshow_item.channel_prefs[channel] = {}
|
||||||
|
|
||||||
channel_prefs = tvshow_item.channel_prefs[channel]
|
channel_prefs = tvshow_item.channel_prefs[channel]
|
||||||
|
|
||||||
|
renumber = add_renumber_options(episodelist[0], head_nfo, tvshow_path)
|
||||||
|
if renumber:
|
||||||
|
channel_prefs['TVSHOW_AUTORENUMBER'] = renumber
|
||||||
|
|
||||||
if action == 'get_seasons':
|
if action == 'get_seasons':
|
||||||
if 'favourite_language' not in channel_prefs:
|
if 'favourite_language' not in channel_prefs:
|
||||||
channel_prefs['favourite_language'] = ''
|
channel_prefs['favourite_language'] = ''
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1
-2
@@ -13,7 +13,6 @@ def test_video_exists(page_url):
|
|||||||
# page_url = re.sub('akvideo.stream/(?:video/|video\\.php\\?file_code=)?(?:embed-)?([a-zA-Z0-9]+)','akvideo.stream/video/\\1',page_url)
|
# page_url = re.sub('akvideo.stream/(?:video/|video\\.php\\?file_code=)?(?:embed-)?([a-zA-Z0-9]+)','akvideo.stream/video/\\1',page_url)
|
||||||
global data
|
global data
|
||||||
page = httptools.downloadpage(page_url)
|
page = httptools.downloadpage(page_url)
|
||||||
logger.info(page.data)
|
|
||||||
if 'embed_ak.php' in page_url or '/embed-' in page.url:
|
if 'embed_ak.php' in page_url or '/embed-' in page.url:
|
||||||
code = scrapertools.find_single_match(page.url, '/embed-([0-9a-z]+)\.html')
|
code = scrapertools.find_single_match(page.url, '/embed-([0-9a-z]+)\.html')
|
||||||
if not code:
|
if not code:
|
||||||
@@ -55,7 +54,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
data = block if block else data
|
data = block if block else data
|
||||||
# URL
|
# URL
|
||||||
# logger.info(data)
|
# logger.info(data)
|
||||||
matches = scrapertools.find_multiple_matches(data, '(http.*?\.mp4)')
|
matches = scrapertools.find_multiple_matches(data, '''src:\s*["']?(http.*?\.mp4)''')
|
||||||
# logger.info(str(matches))
|
# logger.info(str(matches))
|
||||||
_headers = urllib.urlencode(httptools.default_headers)
|
_headers = urllib.urlencode(httptools.default_headers)
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ def renumber(itemlist, item='', typography=''):
|
|||||||
if item:
|
if item:
|
||||||
item.channel = item.from_channel if item.from_channel else item.channel
|
item.channel = item.from_channel if item.from_channel else item.channel
|
||||||
title = item.fulltitle.rstrip()
|
title = item.fulltitle.rstrip()
|
||||||
|
if item.channel in item.channel_prefs and TAG_TVSHOW_RENUMERATE in item.channel_prefs[item.channel] and title not in dict_series:
|
||||||
|
from core.videolibrarytools import check_renumber_options
|
||||||
|
from specials.videolibrary import update_videolibrary
|
||||||
|
check_renumber_options(item)
|
||||||
|
update_videolibrary(item)
|
||||||
|
|
||||||
if inspect.stack()[2][3] == 'find_episodes':
|
if inspect.stack()[2][3] == 'find_episodes':
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ def mainlist(item):
|
|||||||
itemlist.insert(0, Item(channel=item.channel, action="browser", title=support.typo(config.get_localized_string(70222),'bold'),url=DOWNLOAD_PATH))
|
itemlist.insert(0, Item(channel=item.channel, action="browser", title=support.typo(config.get_localized_string(70222),'bold'),url=DOWNLOAD_PATH))
|
||||||
|
|
||||||
if not item.contentType == "tvshow":
|
if not item.contentType == "tvshow":
|
||||||
itemlist.insert(0, Item(channel=item.channel, action="settings", title= support.typo(config.get_localized_string(70223),'bold color kod')))
|
itemlist.insert(0, Item(channel='shortcuts', action="SettingOnPosition", category=4, setting=0, title= support.typo(config.get_localized_string(70288),'bold color kod')))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|||||||
@@ -318,6 +318,8 @@ def get_seasons(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
dict_temp = {}
|
dict_temp = {}
|
||||||
|
|
||||||
|
videolibrarytools.check_renumber_options(item)
|
||||||
|
|
||||||
raiz, carpetas_series, ficheros = next(filetools.walk(item.path))
|
raiz, carpetas_series, ficheros = next(filetools.walk(item.path))
|
||||||
|
|
||||||
# Menu contextual: Releer tvshow.nfo
|
# Menu contextual: Releer tvshow.nfo
|
||||||
@@ -441,6 +443,7 @@ def findvideos(item):
|
|||||||
from specials import autoplay
|
from specials import autoplay
|
||||||
logger.info()
|
logger.info()
|
||||||
# logger.debug("item:\n" + item.tostring('\n'))
|
# logger.debug("item:\n" + item.tostring('\n'))
|
||||||
|
videolibrarytools.check_renumber_options(item)
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
list_canales = {}
|
list_canales = {}
|
||||||
|
|||||||
@@ -26,10 +26,12 @@ from platformcode import updater
|
|||||||
|
|
||||||
|
|
||||||
def update(path, p_dialog, i, t, serie, overwrite):
|
def update(path, p_dialog, i, t, serie, overwrite):
|
||||||
logger.info("Actualizando " + path)
|
logger.info("Updating " + path)
|
||||||
insertados_total = 0
|
insertados_total = 0
|
||||||
|
|
||||||
head_nfo, it = videolibrarytools.read_nfo(path + '/tvshow.nfo')
|
head_nfo, it = videolibrarytools.read_nfo(path + '/tvshow.nfo')
|
||||||
|
# videolibrarytools.check_renumber_options(it)
|
||||||
|
videolibrarytools.update_renumber_options(it, head_nfo, path)
|
||||||
category = serie.category
|
category = serie.category
|
||||||
|
|
||||||
# logger.debug("%s: %s" %(serie.contentSerieName,str(list_canales) ))
|
# logger.debug("%s: %s" %(serie.contentSerieName,str(list_canales) ))
|
||||||
@@ -107,7 +109,7 @@ def update(path, p_dialog, i, t, serie, overwrite):
|
|||||||
|
|
||||||
|
|
||||||
def check_for_update(overwrite=True):
|
def check_for_update(overwrite=True):
|
||||||
logger.info("Actualizando series...")
|
logger.info("Update Series...")
|
||||||
p_dialog = None
|
p_dialog = None
|
||||||
serie_actualizada = False
|
serie_actualizada = False
|
||||||
update_when_finished = False
|
update_when_finished = False
|
||||||
|
|||||||
Reference in New Issue
Block a user