2015-03-23, 13:04
Is it at all possible to easily discern if Kodi is playing a TV show or a Movie during play back? If so how would you do it using Python?
import json
import xbmc
query = {'jsonrpc': '2.0', 'method': 'Player.GetItem', 'params': { 'properties': ['showtitle', 'season', 'episode'], 'playerid': 1 }, 'id': 'VideoGetItem'}
response = json.loads(xbmc.executeJSONRPC(json.dumps(query)))
if response['result']['item']['season'] == -1:
xbmc.log(msg='Movie', level=xbmc.LOGDEBUG)
else:
xbmc.log(msg='TV', level=xbmc.LOGDEBUG)
(2015-03-24, 09:49)phoniclynx Wrote: Where am I looking for the log that xbmc.LOGDEBUG is being put?