I suggest a script addon that uses the JSON refresh methods. Try this:
python:
try:
import simplejson as json
except ImportError:
import json
import xbmc
import xbmcgui
dialog = xbmcgui.Dialog()
if xbmc.getInfoLabel('ListItem.DBType') in ['movie', 'episode', 'musicvideo', 'tvshow']:
refreshtype = xbmc.getInfoLabel('ListItem.DBType')
dbid = int(xbmc.getInfoLabel('ListItem.DBID'))
json_call = ('{{"jsonrpc": "2.0", '
'"method": "VideoLibrary.Refresh{0}", '
'"params" : {{"{0}id": {1}, "ignorenfo": false}}, '
'"id": 1}}'.format(refreshtype, dbid))
json_result = xbmc.executeJSONRPC(json_call)
json_result = json.loads(json_result)
if ('result', 'OK') in json_result.items():
dialog.notification('{} refresh'.format(refreshtype), 'success', xbmcgui.NOTIFICATION_INFO, 2000)
else:
dialog.notification('{} refresh'.format(refreshtype), 'fail', xbmcgui.NOTIFICATION_WARNING, 2000)
else:
dialog.notification('refresh', 'fail -- must use on a video list item', xbmcgui.NOTIFICATION_WARNING, 2000)
create a folder script.refreshvideo
save this file as default.py
then create an addon.xml file as
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.refreshvideo" name="Refresh a video from nfo file" version="0.0.1" provider-name="scott967">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="xbmc.json" version="12.0.0"/>
<import addon="script.module.simplejson" version="3.17.0+matrix.2"/>
</requires>
<extension point="xbmc.python.script" library="default.py">
<provides>executable</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en">Refresh video info script</summary>
<description lang="en">Script to refresh video library items from nfo files. Bind to key as builtin Runscript(script.refreshvideo).</description>
<platform>all</platform>
<license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
<website></website>
<source></source>
<forum></forum>
<email></email>
</extension>
</addon>
With those 2 files, zip up the folder and install addon from zip in Kodi. Add a keymap to run builtin
Code:
RunScript(script.refreshvideo)
Focus a video in a library container view and use the assigned key.
scott s.
.