Trakt segna visti nei canali
This commit is contained in:
@@ -507,6 +507,10 @@ def scrape(func):
|
|||||||
|
|
||||||
# itemlist = filterLang(item, itemlist) # causa problemi a newest
|
# itemlist = filterLang(item, itemlist) # causa problemi a newest
|
||||||
|
|
||||||
|
if config.get_setting('trakt_sync'):
|
||||||
|
from core import trakt_tools
|
||||||
|
trakt_tools.trakt_check(itemlist)
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|||||||
+4
-3
@@ -199,7 +199,7 @@ def trakt_check(itemlist):
|
|||||||
from core.support import typo
|
from core.support import typo
|
||||||
id_result = ''
|
id_result = ''
|
||||||
# check = u'\u221a'
|
# check = u'\u221a'
|
||||||
check = typo(u'\u221a','[] color kod bold')+' '
|
check = typo(u'\u221a','color kod bold')+' '
|
||||||
synced = False
|
synced = False
|
||||||
try:
|
try:
|
||||||
for item in itemlist:
|
for item in itemlist:
|
||||||
@@ -247,7 +247,7 @@ def trakt_check(itemlist):
|
|||||||
|
|
||||||
def get_sync_from_file():
|
def get_sync_from_file():
|
||||||
logger.info()
|
logger.info()
|
||||||
sync_path = os.path.join(config.get_data_path(), 'settings_channels', 'trakt')
|
sync_path = os.path.join(config.get_data_path(), 'settings_channels', 'trakt_data.json')
|
||||||
trakt_node = {}
|
trakt_node = {}
|
||||||
if os.path.exists(sync_path):
|
if os.path.exists(sync_path):
|
||||||
trakt_node = jsontools.get_node_from_file('trakt', "TRAKT")
|
trakt_node = jsontools.get_node_from_file('trakt', "TRAKT")
|
||||||
@@ -260,7 +260,7 @@ def get_sync_from_file():
|
|||||||
def update_trakt_data(mediatype, trakt_data):
|
def update_trakt_data(mediatype, trakt_data):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
sync_path = os.path.join(config.get_data_path(), 'settings_channels', 'trakt')
|
sync_path = os.path.join(config.get_data_path(), 'settings_channels', 'trakt_data.json')
|
||||||
if os.path.exists(sync_path):
|
if os.path.exists(sync_path):
|
||||||
trakt_node = jsontools.get_node_from_file('trakt', "TRAKT")
|
trakt_node = jsontools.get_node_from_file('trakt', "TRAKT")
|
||||||
trakt_node[mediatype] = trakt_data
|
trakt_node[mediatype] = trakt_data
|
||||||
@@ -289,6 +289,7 @@ def wait_for_update_trakt():
|
|||||||
t.isAlive()
|
t.isAlive()
|
||||||
|
|
||||||
def update_all():
|
def update_all():
|
||||||
|
# from core.support import dbg;dbg()
|
||||||
from time import sleep
|
from time import sleep
|
||||||
logger.info()
|
logger.info()
|
||||||
sleep(20)
|
sleep(20)
|
||||||
|
|||||||
@@ -256,6 +256,10 @@ def check_for_update(overwrite=True):
|
|||||||
item_dummy = Item()
|
item_dummy = Item()
|
||||||
videolibrary.list_movies(item_dummy, silent=True)
|
videolibrary.list_movies(item_dummy, silent=True)
|
||||||
|
|
||||||
|
if config.get_setting('trakt_sync'):
|
||||||
|
from core import trakt_tools
|
||||||
|
trakt_tools.update_all()
|
||||||
|
|
||||||
|
|
||||||
def viewmodeMonitor():
|
def viewmodeMonitor():
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user