JSON notifications not reflected in xbmc.Monitor
#1
Hi,
Using JSON introspection in the current 15.2 release, I noted that there are new additions in the 'notifications' area, notably:

Code:
#
      "Playlist.OnAdd": {
        "description": "A playlist item has been added.",
        "params": [
          {
            "name": "sender",
            "required": true,
            "type": "string"
          },
          {
            "name": "data",
            "properties": {
              "item": {
                "$ref": "Notifications.Item"
              },
              "playlistid": {
                "$ref": "Playlist.Id",
                "required": true
              },
              "position": {
                "$ref": "Playlist.Position"
              }
            },
            "required": true,
            "type": "object"
          }
        ],
        "returns": null,
        "type": "notification"
      },
      "Playlist.OnClear": {
        "description": "A playlist item has been cleared.",
        "params": [
          {
            "name": "sender",
            "required": true,
            "type": "string"
          },
          {
            "name": "data",
            "properties": {
              "playlistid": {
                "$ref": "Playlist.Id",
                "required": true
              }
            },
            "required": true,
            "type": "object"
          }
        ],
        "returns": null,
        "type": "notification"
      },
      "Playlist.OnRemove": {
        "description": "A playlist item has been removed.",
        "params": [
          {
            "name": "sender",
            "required": true,
            "type": "string"
          },
          {
            "name": "data",
            "properties": {
              "playlistid": {
                "$ref": "Playlist.Id",
                "required": true
              },
              "position": {
                "$ref": "Playlist.Position"
              }
            },
            "required": true,
            "type": "object"
          }
        ],
        "returns": null,
        "type": "notification"
      },

In python, when using the xbmc.Monitor class, there is a method onNotification (see http://mirrors.kodi.tv/docs/python-docs/...tification).
Currently it seems that the above-mentioned notifications are not propagated back into python for these events.

Of note, I do see other notifications propagated properly such as Input.OnInputRequested and GUI.OnScreensaverActivated.

Is this by design or does this represent something overlooked? Thanks for any help.
Reply
#2
To test and validate json , I would recommends to use these tools.

http://jsonformatter.org

http://codebeautify.org/jsonviewer
Reply
#3
(2016-01-13, 09:19)IrisPanabaker Wrote: To test and validate json , I would recommends to use these tools.

http://jsonformatter.org

http://codebeautify.org/jsonviewer

Spam!
Reply

Logout Mark Read Team Forum Stats Members Help
JSON notifications not reflected in xbmc.Monitor0