{"action":"created","issue":{"url":"https://api.github.com/repos/kodi-pvr/pvr.vdr.vnsi/issues/73","repository_url":"https://api.github.com/repos/kodi-pvr/pvr.vdr.vnsi","labels_url":"https://api.github.com/repos/kodi-pvr/pvr.vdr.vnsi/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/kodi-pvr/pvr.vdr.vnsi/issues/73/comments","events_url":"https://api.github.com/repos/kodi-pvr/pvr.vdr.vnsi/issues/73/events","html_url":"https://github.com/kodi-pvr/pvr.vdr.vnsi/issues/73","id":147456570,"number":73,"title":"SetAddonEnabled=false doesn't drop connection to vdr","user":{"login":"simonbuehler","id":78061,"avatar_url":"https://avatars.githubusercontent.com/u/78061?v=3","gravatar_id":"","url":"https://api.github.com/users/simonbuehler","html_url":"https://github.com/simonbuehler","followers_url":"https://api.github.com/users/simonbuehler/followers","following_url":"https://api.github.com/users/simonbuehler/following{/other_user}","gists_url":"https://api.github.com/users/simonbuehler/gists{/gist_id}","starred_url":"https://api.github.com/users/simonbuehler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonbuehler/subscriptions","organizations_url":"https://api.github.com/users/simonbuehler/orgs","repos_url":"https://api.github.com/users/simonbuehler/repos","events_url":"https://api.github.com/users/simonbuehler/events{/privacy}","received_events_url":"https://api.github.com/users/simonbuehler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-11T14:59:38Z","updated_at":"2016-04-11T17:56:41Z","closed_at":null,"body":"HI,\r\n\r\nI'm trying to migrate away from setting the PVRManager on/off to enabling/disabling the actual PVR Plugin via json rpc.\r\nI do this in order to force he client to disconnect from the pvr server.\r\n\r\nWhile the old approach worked, setting the Addon to Enabled=false does not cause a disconnect.\r\n\r\nHow can this be fixed?\r\n\r\n```\r\n#!/usr/bin/python\r\nimport os\r\nimport sys\r\nimport json, requests\r\nfrom json import JSONEncoder\r\n\r\n\r\nurl = \"http://192.168.1.100:8080/jsonrpc\"\r\n\r\ndef activate(enable) :\r\n    payload = {'jsonrpc': '2.0','method': 'Addons.SetAddonEnabled', 'params' : {'addonid': \"pvr.vdr.vnsi\", 'enabled': enable},'id':1}\r\n    resp = requests.post(url=url, json=payload)\r\n    #out = resp.text\r\n    #print (out)\r\n\r\ndef touch(fname, times=None):\r\n    fhandle = open(fname, 'a')\r\n    try:\r\n        os.utime(fname, times)\r\n    finally:\r\n        fhandle.close()\r\n\r\nif str(sys.argv[1]) == \"true\" :\r\n    touch(\"/tmp/kodiidle\")\r\n    activate(False)\r\n    #xbmc.executebuiltin('xbmc.' + 'StopPVRManager')\r\nelse:\r\n    try:\r\n        os.remove(\"/tmp/kodiidle\")\r\n    except: \r\n        pass\r\n    activate(True)\r\n    #xbmc.executebuiltin('xbmc.' + 'StartPVRManager')\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kodi-pvr/pvr.vdr.vnsi/issues/comments/208475577","html_url":"https://github.com/kodi-pvr/pvr.vdr.vnsi/issues/73#issuecomment-208475577","issue_url":"https://api.github.com/repos/kodi-pvr/pvr.vdr.vnsi/issues/73","id":208475577,"user":{"login":"simonbuehler","id":78061,"avatar_url":"https://avatars.githubusercontent.com/u/78061?v=3","gravatar_id":"","url":"https://api.github.com/users/simonbuehler","html_url":"https://github.com/simonbuehler","followers_url":"https://api.github.com/users/simonbuehler/followers","following_url":"https://api.github.com/users/simonbuehler/following{/other_user}","gists_url":"https://api.github.com/users/simonbuehler/gists{/gist_id}","starred_url":"https://api.github.com/users/simonbuehler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonbuehler/subscriptions","organizations_url":"https://api.github.com/users/simonbuehler/orgs","repos_url":"https://api.github.com/users/simonbuehler/repos","events_url":"https://api.github.com/users/simonbuehler/events{/privacy}","received_events_url":"https://api.github.com/users/simonbuehler/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T17:56:41Z","updated_at":"2016-04-11T17:56:41Z","body":"ok, updated to the latest revision and getting same result: gui works but api not, don't know who's to blame"}}