2020-02-03, 13:42
Hello,
Trying to teach myself some python programming and am trying to get information from the video db with no success. Could someone have a look at this query and perhaps let me know if they see anything wrong? It doesn't seem to work in either Kodi 17 or 18.
Thank you!
Mark
Thank you,
Mark
Trying to teach myself some python programming and am trying to get information from the video db with no success. Could someone have a look at this query and perhaps let me know if they see anything wrong? It doesn't seem to work in either Kodi 17 or 18.
Thank you!
Mark
The only entry I get in the log is this: 16:31:45.022 T:6536 NOTICE: testwindow : This is a test line to test loggingpython:# import the kodi python modules we are going to use
# see the kodi api docs to find out what functionality each module provides
import xbmc
import xbmcgui
import xbmcaddon
import json
def log(txt, mylevel=xbmc.LOGNOTICE):
"""
Logs to Kodi's standard logfile
"""
message = '%s : %s' % ("testwindow", txt)
xbmc.log(msg=message, level=mylevel)
json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": {"filter": {"field": "playcount", "operator": "is", "value": "1"}, "properties" : ["file"], "id": "libMovies"}} ')
log("Raw json returned was %s" % json_query, xbmc.LOGINFO)
log("This is a test line to test logging")
Thank you,
Mark