PVR
#1
I must of missed this in the testing or I'm doing something stupid.

I can't see any real difference between GetChannelGroupDetails and GetChannels. But the problem I can't currently see the answer to is getting PVR.Details.Channel. I'll give some examples and then maybe I can get a silly mistake spotted Smile

Code:
{"jsonrpc": "2.0", "method": "PVR.GetChannelDetails", "params": { "channelid": 6, "properties": [ "starttime" ] }, "id": 1}
Doesn't like "starttime", it will only except PVR.Fields.Channel. Which is what introspect says but then how can you get "starttime" and "endtime"? I may be reading intospect incorrectly but it says:
Code:
"params": [
                    {
                        "$ref": "Library.Id",
                        "name": "channelid",
                        "required": true
                    },
                    {
                        "$ref": "PVR.Fields.Channel",
                        "name": "properties"
                    }
                ],
                "returns": {
                    "properties": {
                        "channeldetails": {
                            "$ref": "PVR.Details.Channel"
                        }
                    },
How can it be $ref: "Fields" but return "Details"?

GetChannels also only excepts PVR.Fields.Channel.

Basically I want to list all channels with the current programme name, with start and end time.

Hopefully I'm doing something obviously wrong. I think I have introspect blindness atm Smile
Image
AWXi - Ajax web interface. Wiki
Reply
#2
The different between GetChannelGroupDetails and GetChannels is that GetChannelGroupDetails also returns the name of the channel group and its ID. Apart from that there's no real difference.

That introspect part looks good to me. the "properties" parameter expects enum values defined in "PVR.Fields.Channel" and the return value can contain properties defined in "PVR.Details.Channel". And as you can see in Introspect neither "PVR.Details.Channel" nor "PVR.Fields.Channel" contains "starttime" or "endtime". Those are EPG-specific information and JSON-RPC doesn't support that yet (except for Player.GetItem for the currently playing item). As we are already in feature freeze I was only allowed to implement the most crucial methods to support PVR in JSON-RPC and those were being able to start a PVR stream (for which we need GetChannelGroups, GetChannels and the additiona to Player.Open) and to control a currently playing PVR channel through the methods in the Player namespace. Anything else is considered non-crucial and will therefore not be part of Frodo (as decreed by Frodo's release manager spiff).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
I thought that might be the case re the current programme etc.

Code:
"PVR.Details.Channel": {
                "extends": "Item.Details.Base",
                "id": "PVR.Details.Channel",
                "properties": {
                    "channel": {
                        "default": "",
                        "type": "string"
                    },
                    "channelid": {
                        "$ref": "Library.Id",
                        "required": true
                    },
                    "channeltype": {
                        "$ref": "PVR.Channel.Type",
                        "default": "tv"
                    },
                    "endtime": {
                        "default": "",
                        "type": "string"
                    },
                    "hidden": {
                        "default": false,
                        "type": "boolean"
                    },
                    "locked": {
                        "default": false,
                        "type": "boolean"
                    },
                    "starttime": {
                        "default": "",
                        "type": "string"
                    },
                    "thumbnail": {
                        "default": "",
                        "type": "string"
                    }
                }
            },
            "PVR.Fields.Channel": {
                "extends": "Item.Fields.Base",
                "id": "PVR.Fields.Channel",
                "items": {
                    "enums": [
                        "thumbnail",
                        "channeltype",
                        "hidden",
                        "locked",
                        "channel",
                        "lastplayed"
                    ],
                    "type": "string"
                }
            }
That's where I got "starttime" and "endtime" from and why I thought they were different. My brain is a bit fried atm so... Smile
Image
AWXi - Ajax web interface. Wiki
Reply
#4
Ah right, that's a bug in the JSON schema. Thanks for pointing it out. Will remove "starttime" and "endtime" from there ASAP.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
Tried the pvr.record. I toggled on by channelid fine. When I tried to toggle of it locked GUI but web interface was still working.
Code:
23:47:45 T:2864704320   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "PVR.Record", "params": { "record": "toggle", "channel": 3 }, "id": "pvrRecord"}
23:47:45 T:2864704320   DEBUG: JSONRPC: Calling pvr.record
23:47:45 T:2864704320   DEBUG: JSONRPC: Type mismatch in type
Above is the toggle off from log. Enough to go on or do you need more?

Also, is there a way to tell if a channel is being recorded? I thought it might be "locked" but that false when recording.
Image
AWXi - Ajax web interface. Wiki
Reply
#6
Regarding the "channel" property. I expected it to return the channel number, same as "season" or "episode" would. Any chance this could be changed? It currently returns the channel label.
@Mizaki i think it should be "channelid": 3, your calling "channel". just a guess tho.
Image
Reply
#7
@mizaki: Yup it should be "channelid" and not "channel" but I don't know why it would lock the GUI. The backends I had access to for testing didn't support recording so I couldn't test that functionality.

@N3MIS15: I first wanted to return the channel number in "channelnumber" but opdenkamp told me to the list is already sorted by channelnumber and that I shouldn't provide the channel number to clients and use "channelid" wherever possible. The "channel" property is simlar to the "artist" property in AudioLibrary.GetArtists. We can't use "title" because that is already used for the title of the currently playing show so I went with "channel". Obviously you can always use "label" as well which is identical to "channel" right now.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#8
yea, fair enough. I only wanted the channel number to display it to the user (as it is on confuence ui).
Image
Reply
#9
You can deduce it from the position in the response array (at least that how I understood opdenkamp).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#10
It is "channel" because you can use "current" Smile
https://github.com/xbmc/xbmc/pull/1594/files#L10R153

It toggled on fine. Just when I tried to toggle off. I'll try and get some more info. It was late and thought it might be something obvious.
Image
AWXi - Ajax web interface. Wiki
Reply
#11
It's a more general PVR problem as I've had it occur when only using GUI.
Image
AWXi - Ajax web interface. Wiki
Reply

Logout Mark Read Team Forum Stats Members Help
PVR0