Fix Trakt
This commit is contained in:
@@ -1139,6 +1139,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.channel = item.channel
|
||||
videoitem.contentType = item.contentType
|
||||
videoitem.infoLabels = item.infoLabels
|
||||
verifiedItemlist.append(videoitem)
|
||||
|
||||
if patronTag:
|
||||
|
||||
@@ -83,11 +83,10 @@ def mark_auto_as_watched(item):
|
||||
time.sleep(30)
|
||||
|
||||
# Sincronizacion silenciosa con Trakt
|
||||
if sync_with_trakt:
|
||||
if config.get_setting("sync_trakt_watched", "videolibrary"):
|
||||
sync_trakt_kodi()
|
||||
if sync_with_trakt and config.get_setting("trakt_sync"):
|
||||
sync_trakt_kodi()
|
||||
|
||||
# logger.debug("Fin del hilo")
|
||||
# logger.debug("Fin del hilo")
|
||||
|
||||
# Si esta configurado para marcar como visto
|
||||
if config.get_setting("mark_as_watched", "videolibrary"):
|
||||
@@ -455,8 +454,7 @@ def get_data(payload):
|
||||
except:
|
||||
xbmc_port = 0
|
||||
|
||||
xbmc_json_rpc_url = "http://" + config.get_setting("xbmc_host", "videolibrary") + ":" + str(
|
||||
xbmc_port) + "/jsonrpc"
|
||||
xbmc_json_rpc_url = "http://" + config.get_setting("xbmc_host", "videolibrary") + ":" + str(xbmc_port) + "/jsonrpc"
|
||||
req = urllib.request.Request(xbmc_json_rpc_url, data=jsontools.dump(payload), headers=headers)
|
||||
f = urllib.request.urlopen(req)
|
||||
response = f.read()
|
||||
|
||||
@@ -923,7 +923,6 @@ def verify_playcount_series(item, path):
|
||||
def mark_content_as_watched2(item):
|
||||
logger.info()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
|
||||
if filetools.isfile(item.nfo):
|
||||
head_nfo, it = videolibrarytools.read_nfo(item.nfo)
|
||||
#logger.debug(it)
|
||||
@@ -935,7 +934,7 @@ def mark_content_as_watched2(item):
|
||||
it.library_playcounts.update({name_file: item.playcount})
|
||||
|
||||
if item.contentType == 'episode' or item.contentType == 'tvshow' or item.contentType == 'list' or name_file == 'tvshow':
|
||||
# elif item.contentType == 'episode':
|
||||
# elif item.contentType == 'episode':
|
||||
name_file = os.path.splitext(filetools.basename(item.strm_path))[0]
|
||||
num_season = name_file [0]
|
||||
item.__setattr__('contentType', 'episode')
|
||||
@@ -958,7 +957,7 @@ def mark_content_as_watched2(item):
|
||||
# Guardamos los cambios en item.nfo
|
||||
if filetools.write(item.nfo, head_nfo + it.tojson()):
|
||||
item.infoLabels['playcount'] = item.playcount
|
||||
#logger.debug(item.playcount)
|
||||
# logger.debug(item.playcount)
|
||||
|
||||
# if item.contentType == 'episodesss':
|
||||
# Actualizar toda la serie
|
||||
@@ -968,9 +967,9 @@ def mark_content_as_watched2(item):
|
||||
if config.is_xbmc():
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.mark_content_as_watched_on_kodi(item , item.playcount)
|
||||
# logger.debug(item)
|
||||
# logger.debug(item)
|
||||
|
||||
platformtools.itemlist_refresh()
|
||||
# platformtools.itemlist_refresh()
|
||||
|
||||
|
||||
def mark_content_as_watched(item):
|
||||
|
||||
Reference in New Issue
Block a user