Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -7,47 +7,5 @@
|
|||||||
"thumbnail": "animepertutti.png",
|
"thumbnail": "animepertutti.png",
|
||||||
"bannermenu": "animepertutti.png",
|
"bannermenu": "animepertutti.png",
|
||||||
"categories": ["anime"],
|
"categories": ["anime"],
|
||||||
"settings": [
|
"settings": []
|
||||||
{
|
|
||||||
"id": "include_in_global_search",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Includi ricerca globale",
|
|
||||||
"default": false,
|
|
||||||
"enabled": false,
|
|
||||||
"visible": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "checklinks",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Verifica se i link esistono",
|
|
||||||
"default": false,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "checklinks_number",
|
|
||||||
"type": "list",
|
|
||||||
"label": "Numero de link da verificare",
|
|
||||||
"default": 1,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": "eq(-1,true)",
|
|
||||||
"lvalues": [ "1", "3", "5", "10" ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "autorenumber",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "@70712",
|
|
||||||
"default": false,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "autorenumber_mode",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "@70688",
|
|
||||||
"default": false,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": "eq(-1,true)"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-43
@@ -7,47 +7,5 @@
|
|||||||
"thumbnail": "seriehd.png",
|
"thumbnail": "seriehd.png",
|
||||||
"banner": "seriehd.png",
|
"banner": "seriehd.png",
|
||||||
"categories": ["tvshow"],
|
"categories": ["tvshow"],
|
||||||
"settings": [
|
"settings": []
|
||||||
{
|
|
||||||
"id": "include_in_global_search",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Includi ricerca globale",
|
|
||||||
"default": true,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "include_in_newest_series",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Includi in Novità - Serie TV",
|
|
||||||
"default": true,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "include_in_newest_italiano",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Includi in Novità - Italiano",
|
|
||||||
"default": true,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "checklinks",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Verifica se i link esistono",
|
|
||||||
"default": false,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "checklinks_number",
|
|
||||||
"type": "list",
|
|
||||||
"label": "Numero de link da verificare",
|
|
||||||
"default": 1,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": "eq(-1,true)",
|
|
||||||
"lvalues": [ "1", "3", "5", "10" ]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-3
@@ -111,9 +111,7 @@ def episodios(item):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
support.log()
|
support.log()
|
||||||
itemlist = []
|
return support.hdpass_get_servers(item)
|
||||||
itemlist = support.hdpass_get_servers(item)
|
|
||||||
return support.controls(itemlist, item)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+47
-4
@@ -169,21 +169,64 @@ def get_channel_controls_settings(channel_name):
|
|||||||
return list_controls, dict_settings
|
return list_controls, dict_settings
|
||||||
|
|
||||||
def get_default_settings(channel_name):
|
def get_default_settings(channel_name):
|
||||||
import filetools
|
import filetools, inspect
|
||||||
|
from core import support, scrapertoolsV2
|
||||||
|
channel = __import__('channels.%s' % channel_name, fromlist=["channels.%s" % channel_name])
|
||||||
|
if hasattr(channel, 'list_language'):
|
||||||
|
list_language = channel.list_language
|
||||||
|
list_language.insert(0, config.get_localized_string(70522))
|
||||||
|
else:
|
||||||
|
list_language = []
|
||||||
|
if 'episodios' in dir(channel):
|
||||||
|
episodios = getattr(__import__('channels.%s' % channel_name, fromlist=['episodios']), 'episodios')
|
||||||
|
anime = scrapertoolsV2.find_single_match(inspect.getsource(support.extract_wrapped(episodios)), r'(anime\s*=\s*True)')
|
||||||
|
|
||||||
channel_controls = get_channel_json(channel_name).get('settings', list())
|
channel_controls = get_channel_json(channel_name).get('settings', list())
|
||||||
default_path = filetools.join(config.get_runtime_path(), 'default_channel_settings' + '.json')
|
default_path = filetools.join(config.get_runtime_path(), 'default_channel_settings' + '.json')
|
||||||
default_controls = jsontools.load(filetools.read(default_path)).get('settings', list())
|
default_controls = jsontools.load(filetools.read(default_path)).get('settings', list())
|
||||||
|
default_controls_anime = jsontools.load(filetools.read(default_path)).get('anime', list())
|
||||||
categories = get_channel_json(channel_name).get('categories', list())
|
categories = get_channel_json(channel_name).get('categories', list())
|
||||||
for control in default_controls:
|
for control in default_controls:
|
||||||
if control['id'] not in str(channel_controls):
|
if control['id'] not in str(channel_controls):
|
||||||
if control['id'] == 'include_in_newest_peliculas' and 'movie' not in categories:
|
if 'include_in_newest' in control['id']:
|
||||||
|
label = control['id'].split('_')
|
||||||
|
label = label[-1]
|
||||||
|
if label == 'peliculas':
|
||||||
|
if 'movie' not in categories:
|
||||||
pass
|
pass
|
||||||
elif control['id'] == 'include_in_newest_series' and 'tvshow' not in categories:
|
else:
|
||||||
|
control['label'] = config.get_localized_string(70727) + ' - ' + config.get_localized_string(30122)
|
||||||
|
channel_controls.append(control)
|
||||||
|
logger.info(control)
|
||||||
|
elif label == 'series':
|
||||||
|
if 'tvshow' not in categories:
|
||||||
pass
|
pass
|
||||||
elif control['id'] == 'include_in_newest_anime' and 'anime' not in categories:
|
else:
|
||||||
|
control['label'] = config.get_localized_string(70727) + ' - ' + config.get_localized_string(30123)
|
||||||
|
channel_controls.append(control)
|
||||||
|
elif label == 'anime':
|
||||||
|
if 'anime' not in categories:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
control['label'] = config.get_localized_string(70727) + ' - ' + config.get_localized_string(30124)
|
||||||
|
channel_controls.append(control)
|
||||||
|
else:
|
||||||
|
control['label'] = config.get_localized_string(70727) + ' - ' + label.capitalize()
|
||||||
|
channel_controls.append(control)
|
||||||
|
|
||||||
|
elif control['id'] == 'filter_languages':
|
||||||
|
if len(list_language) > 1:
|
||||||
|
control['lvalues'] = list_language
|
||||||
|
channel_controls.append(control)
|
||||||
|
else:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
channel_controls.append(control)
|
channel_controls.append(control)
|
||||||
|
if anime:
|
||||||
|
for control in default_controls_anime:
|
||||||
|
if control['id'] not in str(channel_controls):
|
||||||
|
channel_controls.append(control)
|
||||||
|
else: pass
|
||||||
return channel_controls
|
return channel_controls
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+19
-2
@@ -260,8 +260,8 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
|||||||
infoLabels=infolabels,
|
infoLabels=infolabels,
|
||||||
thumbnail=item.thumbnail if function == 'episodios' else scraped["thumb"] ,
|
thumbnail=item.thumbnail if function == 'episodios' else scraped["thumb"] ,
|
||||||
args=item.args,
|
args=item.args,
|
||||||
contentSerieName=item.fulltitle if item.contentType != 'movie' else '',
|
contentSerieName= title if item.contentType != 'movie' and function != 'episodios' else item.fulltitle if function == 'episodios' else '',
|
||||||
contentTitle=title if item.contentType == 'movie' else '',
|
contentTitle= title if item.contentType == 'movie' else '',
|
||||||
contentLanguage=lang,
|
contentLanguage=lang,
|
||||||
ep=episode if episode else ''
|
ep=episode if episode else ''
|
||||||
)
|
)
|
||||||
@@ -331,6 +331,7 @@ def scrape(func):
|
|||||||
debug = args['debug'] if 'debug' in args else False
|
debug = args['debug'] if 'debug' in args else False
|
||||||
if 'pagination' in args: pagination = args['pagination'] if args['pagination'] else 20
|
if 'pagination' in args: pagination = args['pagination'] if args['pagination'] else 20
|
||||||
else: pagination = ''
|
else: pagination = ''
|
||||||
|
list_language = func.__globals__['list_language'] if 'list_language' in func.__globals__ else {}
|
||||||
|
|
||||||
pag = item.page if item.page else 1 # pagination
|
pag = item.page if item.page else 1 # pagination
|
||||||
matches = []
|
matches = []
|
||||||
@@ -404,6 +405,17 @@ def scrape(func):
|
|||||||
if 'fullItemlistHook' in args:
|
if 'fullItemlistHook' in args:
|
||||||
itemlist = args['fullItemlistHook'](itemlist)
|
itemlist = args['fullItemlistHook'](itemlist)
|
||||||
|
|
||||||
|
filterLang = False
|
||||||
|
for item in itemlist:
|
||||||
|
if item.contentLanguage:
|
||||||
|
filterLang = True
|
||||||
|
break
|
||||||
|
|
||||||
|
if list_language and filterLang:
|
||||||
|
log('Lista Lingue = ', list_language)
|
||||||
|
from specials import filtertools
|
||||||
|
return filtertools.get_links(itemlist, item, list_language)
|
||||||
|
else:
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
@@ -936,3 +948,8 @@ def channel_config(item, itemlist):
|
|||||||
thumbnail=get_thumb('setting_0.png'))
|
thumbnail=get_thumb('setting_0.png'))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def extract_wrapped(decorated):
|
||||||
|
from types import FunctionType
|
||||||
|
closure = (c.cell_contents for c in decorated.__closure__)
|
||||||
|
return next((c for c in closure if isinstance(c, FunctionType)), None)
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
"id": "include_in_global_search",
|
"id": "include_in_global_search",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"label": "Includi in Ricerca Globale",
|
"label": "@70728",
|
||||||
"default": true,
|
"default": true,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": true
|
"visible": true
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
{
|
{
|
||||||
"id": "include_in_newest_peliculas",
|
"id": "include_in_newest_peliculas",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"label": "Includi in Novità - Film",
|
"label": "@70727",
|
||||||
"default": true,
|
"default": true,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": true
|
"visible": true
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
{
|
{
|
||||||
"id": "include_in_newest_series",
|
"id": "include_in_newest_series",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"label": "Includi in Novità - Serie TV",
|
"label": "@70727",
|
||||||
"default": true,
|
"default": true,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": true
|
"visible": true
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
{
|
{
|
||||||
"id": "include_in_newest_anime",
|
"id": "include_in_newest_anime",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"label": "Includi in Novità - Anime",
|
"label": "@70727",
|
||||||
"default": true,
|
"default": true,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": true
|
"visible": true
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
{
|
{
|
||||||
"id": "include_in_newest_italiano",
|
"id": "include_in_newest_italiano",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"label": "Includi in Novità - Italiano",
|
"label": "@70727",
|
||||||
"default": true,
|
"default": true,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": true
|
"visible": true
|
||||||
@@ -52,10 +52,38 @@
|
|||||||
"id": "checklinks_number",
|
"id": "checklinks_number",
|
||||||
"type": "list",
|
"type": "list",
|
||||||
"label": "Numero di link da verificare",
|
"label": "Numero di link da verificare",
|
||||||
"default": 1,
|
"default": 2,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": "eq(-1,true)",
|
"visible": "eq(-1,true)",
|
||||||
"lvalues": [ "5", "10", "15", "20" ]
|
"lvalues": [ "3", "5", "10", "15", "20" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "filter_languages",
|
||||||
|
"type": "list",
|
||||||
|
"label": "@30019",
|
||||||
|
"default": 0,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true,
|
||||||
|
"lvalues": ["Non Filtrare"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
"anime": [
|
||||||
|
{
|
||||||
|
"id": "autorenumber",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "@70712",
|
||||||
|
"default": false,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "autorenumber_mode",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "@70688",
|
||||||
|
"default": false,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": "eq(-1,true)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5616,3 +5616,19 @@ msgstr ""
|
|||||||
msgctxt "#70724"
|
msgctxt "#70724"
|
||||||
msgid "Channel"
|
msgid "Channel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#70725"
|
||||||
|
msgid "Select the language"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#70726"
|
||||||
|
msgid "Seleziona la qualità"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#70727"
|
||||||
|
msgid "Include in News"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#70728"
|
||||||
|
msgid "Include in Global Search"
|
||||||
|
msgstr ""
|
||||||
@@ -5616,3 +5616,19 @@ msgstr "collegamenti nella cartella"
|
|||||||
msgctxt "#70724"
|
msgctxt "#70724"
|
||||||
msgid "Channel"
|
msgid "Channel"
|
||||||
msgstr "Canale"
|
msgstr "Canale"
|
||||||
|
|
||||||
|
msgctxt "#70725"
|
||||||
|
msgid "Select the language"
|
||||||
|
msgstr "Seleziona la lingua"
|
||||||
|
|
||||||
|
msgctxt "#70726"
|
||||||
|
msgid "Seleziona la qualità"
|
||||||
|
msgstr "Select the quality"
|
||||||
|
|
||||||
|
msgctxt "#70727"
|
||||||
|
msgid "Include in News"
|
||||||
|
msgstr "Includi in Novità"
|
||||||
|
|
||||||
|
msgctxt "#70728"
|
||||||
|
msgid "Include in Global Search"
|
||||||
|
msgstr "Includi in Ricerca Globale"
|
||||||
+26
-1
@@ -779,6 +779,28 @@ def get_episodes(item):
|
|||||||
else:
|
else:
|
||||||
logger.info("Omitting invalid item: %s" % episode.tostring())
|
logger.info("Omitting invalid item: %s" % episode.tostring())
|
||||||
|
|
||||||
|
# if Multiple Languages or Qualities
|
||||||
|
list_lang = []
|
||||||
|
list_quality = []
|
||||||
|
for item in itemlist:
|
||||||
|
if not item.language: item.language = item.contentLanguage
|
||||||
|
if item.language not in list_lang: list_lang.append(item.language)
|
||||||
|
if item.infoLabels['quality'] not in list_quality: list_quality.append(item.infoLabels['quality'])
|
||||||
|
if len(list_lang) > 1:
|
||||||
|
selection = platformtools.dialog_select(config.get_localized_string(70725),list_lang)
|
||||||
|
it = []
|
||||||
|
for item in itemlist:
|
||||||
|
if not item.language: item.language = item.contentLanguage
|
||||||
|
if item.language == list_lang[selection]:
|
||||||
|
it.append(item)
|
||||||
|
itemlist = it
|
||||||
|
if len(list_quality) > 1:
|
||||||
|
selection = platformtools.dialog_select(config.get_localized_string(70726),list_quality)
|
||||||
|
it = []
|
||||||
|
for item in itemlist:
|
||||||
|
if item.infoLabels['quality'] == list_quality[selection]: it.append(item)
|
||||||
|
itemlist = it
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -887,8 +909,11 @@ def save_download_tvshow(item):
|
|||||||
|
|
||||||
item.show = item.fulltitle
|
item.show = item.fulltitle
|
||||||
scraper.find_and_set_infoLabels(item)
|
scraper.find_and_set_infoLabels(item)
|
||||||
logger.info('ID= ' + item.infoLabels['IMDBNumber'])
|
item.contentSerieName = item.fulltitle
|
||||||
|
|
||||||
item.downloadFilename = filetools.validate_path("%s [%s]" % (item.contentSerieName, item.infoLabels['IMDBNumber']))
|
item.downloadFilename = filetools.validate_path("%s [%s]" % (item.contentSerieName, item.infoLabels['IMDBNumber']))
|
||||||
|
if config.get_setting("lowerize_title", "videolibrary") == 0:
|
||||||
|
item.downloadFilename = item.downloadFilename.lower()
|
||||||
progreso.update(0, config.get_localized_string(70186), config.get_localized_string(70187) % item.contentChannel)
|
progreso.update(0, config.get_localized_string(70186), config.get_localized_string(70187) % item.contentChannel)
|
||||||
|
|
||||||
episodes = get_episodes(item)
|
episodes = get_episodes(item)
|
||||||
|
|||||||
@@ -163,6 +163,8 @@ def load(item):
|
|||||||
|
|
||||||
|
|
||||||
def check_conditions(_filter, list_item, item, list_language, list_quality, quality_count=0, language_count=0):
|
def check_conditions(_filter, list_item, item, list_language, list_quality, quality_count=0, language_count=0):
|
||||||
|
if not item.language: item.language = item.contentLanguage
|
||||||
|
|
||||||
is_language_valid = True
|
is_language_valid = True
|
||||||
if _filter.language:
|
if _filter.language:
|
||||||
# logger.debug("title es %s" % item.title)
|
# logger.debug("title es %s" % item.title)
|
||||||
|
|||||||
Reference in New Issue
Block a user