checkHost -> part1
This commit is contained in:
@@ -140,7 +140,7 @@ def pelicuals_tv(item):
|
|||||||
contentLanguage='Sub-ITA',
|
contentLanguage='Sub-ITA',
|
||||||
infoLabels=infoLabels,
|
infoLabels=infoLabels,
|
||||||
folder=True))
|
folder=True))
|
||||||
|
support.checkHost(item, itemlist)
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
|
||||||
# Paginazione
|
# Paginazione
|
||||||
@@ -237,6 +237,7 @@ def lista_serie(item):
|
|||||||
folder=True))
|
folder=True))
|
||||||
# ii += 1
|
# ii += 1
|
||||||
|
|
||||||
|
support.checkHost(item, itemlist)
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
|
||||||
if len(series) >= p * PERPAGE:
|
if len(series) >= p * PERPAGE:
|
||||||
|
|||||||
+17
-2
@@ -8,7 +8,7 @@ import urlparse
|
|||||||
import xbmcaddon
|
import xbmcaddon
|
||||||
|
|
||||||
from channelselector import thumb
|
from channelselector import thumb
|
||||||
from core import httptools, scrapertoolsV2, servertools, tmdb
|
from core import httptools, scrapertoolsV2, servertools, tmdb, channeltools
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from lib import unshortenit
|
from lib import unshortenit
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
@@ -225,7 +225,7 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
|
|||||||
it.__setattr__(lg, match[listGroups.index(lg)])
|
it.__setattr__(lg, match[listGroups.index(lg)])
|
||||||
|
|
||||||
itemlist.append(it)
|
itemlist.append(it)
|
||||||
|
checkHost(item, itemlist)
|
||||||
if (item.contentType == "episode" and (action != "findvideos" and action != "play")) \
|
if (item.contentType == "episode" and (action != "findvideos" and action != "play")) \
|
||||||
or (item.contentType == "movie" and action != "play"):
|
or (item.contentType == "movie" and action != "play"):
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
@@ -243,6 +243,21 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
|
|||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def checkHost(item, itemlist):
|
||||||
|
# nel caso non ci siano risultati puo essere che l'utente abbia cambiato manualmente l'host, pertanto lo riporta
|
||||||
|
# al valore di default (fixa anche il problema del cambio di host da parte nostra)
|
||||||
|
if len(itemlist) == 0:
|
||||||
|
# trovo il valore di default
|
||||||
|
defHost = None
|
||||||
|
for s in channeltools.get_channel_json(item.channel)['settings']:
|
||||||
|
if s['id'] == 'channel_host':
|
||||||
|
defHost = s['default']
|
||||||
|
break
|
||||||
|
# lo confronto con quello attuale
|
||||||
|
if config.get_setting('channel_host', item.channel) != defHost:
|
||||||
|
config.set_setting('channel_host', defHost, item.channel)
|
||||||
|
|
||||||
|
|
||||||
def dooplay_get_links(item, host):
|
def dooplay_get_links(item, host):
|
||||||
# get links from websites using dooplay theme and dooplay_player
|
# get links from websites using dooplay theme and dooplay_player
|
||||||
# return a list of dict containing these values: url, title and server
|
# return a list of dict containing these values: url, title and server
|
||||||
|
|||||||
Reference in New Issue
Block a user