Fix for series download (some problem with scrape)

This commit is contained in:
Alhaziel
2019-06-04 21:16:05 +02:00
parent 70d744e65f
commit eca5fa4480
7 changed files with 60 additions and 64 deletions

View File

@@ -206,6 +206,8 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
if scraped['type'] in variants:
action = name
if inspect.stack()[1][3] == 'episodios': item.contentType = 'episode'
if scraped["title"] not in blacklist:
it = Item(
channel=item.channel,
@@ -489,7 +491,7 @@ def videolibrary(itemlist, item, typography='', function_level=1):
# Function_level is useful if the function is called by another function.
# If the call is direct, leave it blank
if item.contentType == 'movie':
if item.contentType != 'episode':
action = 'add_pelicula_to_library'
extra = 'findvideos'
contentType = 'movie'
@@ -575,12 +577,6 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True):
CL = get_setting('checklinks') or get_setting('checklinks', item.channel)
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
channel_node = autoplay_node.get(item.channel, {})
if not channel_node: # non ha mai aperto il menu del canale quindi in autoplay_data.json non c'e la key
channelFile = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
autoplay.init(item.channel, channelFile.list_servers, channelFile.list_quality)
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
channel_node = autoplay_node.get(item.channel, {})
settings_node = channel_node.get('settings', {})
AP = get_setting('autoplay') or settings_node['active']