- Fix segna come visto in KoD per video visti in precedenza

- Probabile fix segna come visto e Episodio successivo
This commit is contained in:
Alhaziel01
2021-01-30 11:00:43 +01:00
parent 2c98ce45cf
commit 154dfa469f
2 changed files with 60 additions and 31 deletions
+5 -5
View File
@@ -354,12 +354,12 @@ def mark_season_as_watched_on_kodi(item, value=1):
def set_watched_on_kod(data):
from specials import videolibrary
from core import videolibrarytools
logger.debug('TYPE',type(data))
data = jsontools.load(data)
logger.debug('TYPE',type(data))
Type = data['item']['type']
ID = data['item']['id']
playcount = data['playcount']
Type = data.get('item', {}).get('type','')
ID = data.get('item', {}).get('id','')
if not Type or not ID:
return
playcount = data.get('playcount',0)
for Type in ['movie', 'episode']:
sql = 'select strFileName, strPath, uniqueid_value from %s_view where (id%s like "%s")' % (Type, Type.capitalize(), ID)
n, records = execute_sql_kodi(sql)