JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - sWORDs - 2014-06-19 Does JSON-RPC API/v6 still support TCP? And if so does it support notification over TCP, or is that a websocket only feature? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-06-19 (2014-06-19, 12:10)sWORDs Wrote: Does JSON-RPC API/v6 still support TCP? And if so does it support notification over TCP, or is that a websocket only feature? Why shouldn't it? TCP and websocket offer the same functionality, they just use a different protocol. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - sWORDs - 2014-06-19 Because it's no longer mentioned in the v6 docs, but thanks! RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-06-19 It doesn't depend on the JSON-RPC API version. That's why it's not mentioned on the API version specific page but on the general JSON-RPC page. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lunatixz - 2014-06-30 I'm trying to get a list of all art for a xbmc source folder... info returns fine in a python IDE, but from within xbmc it doesn't work... any ideas? python code: Code: json_query = uni('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "%s", "properties":["art"]}, "id": 1}' % ((path), media)) Output in xbmc: Code: 19:49:03 T:22160 DEBUG: JSONRPC: Incoming request: {"jsonrpc":"2.0","method":"Files.GetDirectory","params":{"directory":"smb://192.168.0.0/TV/Orphan Black/Season 02","media":"video","properties":["art"]}, "id": 1} Source query to verify path is in white list: Code: "file": "smb://192.168.0.0/TV/", RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-06-30 Is it possible that you require usernamed and password for that specific samba share? Because those tend to confuse the CUtil::GetMatchingSource() logic. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lunatixz - 2014-06-30 (2014-06-30, 07:46)Montellese Wrote: Is it possible that you require usernamed and password for that specific samba share? Because those tend to confuse the CUtil::GetMatchingSource() logic.Thanks for the responce... the shares are accessible with or without login creds (Full access to everyone). Not sure why a external json request works and from within xbmc it doesn't. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-06-30 Could you clarify with what you mean by "in a python IDE" and "from within xbmc"? Do you run the same python code but once as an external JSON-RPC client and once as an XBMC python addon? (sorry I'm not familiar with python) RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2014-06-30 Well I hope you changed the IP for the sample or use a special network mask, but 192.168.0.0 is not a valid IP with standard mask /24 (255.255.255.0) so i suppose curl or other internals in XBMC does not really well handle that. Anyway it's not recommended to use .0 as IP as it's usually the network/subnetwork ID RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lunatixz - 2014-06-30 (2014-06-30, 10:11)Tolriq Wrote: Well I hope you changed the IP for the sample or use a special network mask, but 192.168.0.0 is not a valid IP with standard mask /24 (255.255.255.0) so i suppose curl or other internals in XBMC does not really well handle that. Lol, give me some credit... I just removed my addy info. (force of habit) (2014-06-30, 09:03)Montellese Wrote: Could you clarify with what you mean by "in a python IDE" and "from within xbmc"? Do you run the same python code but once as an external JSON-RPC client and once as an XBMC python addon? (sorry I'm not familiar with python) IDE is using http, xbmc python is using http, and if it fails internal executeJSONRPC. I have to go back and add some log entries so I can see which is being used at the time it fails... either way the same package returns on one and doesn't in the other. I'll get back to you. ::Update:: Okay so both http and executeJSONRPC fail to find a match from within xbmc, but http works in IDE. Code works because every other json request from (IDE and XBMC) goes through except for this one.... I tried with or without password to samba. ::Update:: It's the oddest thing, I must be overlooking something.. because as I said before a different query goes through... but art parameter doesn't detect source. I tried xbmc.validatePath and uniencode in hope that the directory string was the problem... but nothing. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - ben- - 2014-06-30 (2014-06-30, 02:00)Lunatixz Wrote: I'm trying to get a list of all art for a xbmc source folder... info returns fine in a python IDE, but from within xbmc it doesn't work... any ideas? You might try URL encoding the directory since it contains spaces (or at lease replace the spaces with %20). Might be an interesting data point. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lunatixz - 2014-07-01 (2014-06-30, 22:52)ben- Wrote:(2014-06-30, 02:00)Lunatixz Wrote: I'm trying to get a list of all art for a xbmc source folder... info returns fine in a python IDE, but from within xbmc it doesn't work... any ideas? No luck url encode Code: 15:28:59 T:8812 DEBUG: JSONRPC: Incoming request: {"jsonrpc":"2.0","method":"Files.GetDirectory","params":{"directory":"smb%3A//192.168.0.1/TV/Rectify/Season%2001","media":"video","properties":["art"]},"id":1} replace space only: Code: 15:31:48 T:4852 DEBUG: CUtil::GetMatchingSource: no matching source found for [smb://192.168.0.51/TV/Eagleheart/Season%2001] RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lunatixz - 2014-07-04 Still have not found a solution to my problem... This results in a return from outside XBMC Code: http://localhost:8080/jsonrpc?request={"jsonrpc":"2.0","method":"Files.GetDirectory","params":{"directory":"smb://192.168.0.5/TV/Orphan Black/Season 02","media":"video","properties":["art"]},"id":10} Same command in XBMC using both http or direct execjson doesn't work Code: 22:27:09 T:3460 DEBUG: script.pseudotv.live-ChannelList: sendJSON command: {"jsonrpc":"2.0","method":"Files.GetDirectory","params":{"directory":"smb://192.168.0.5/TV/Once Upon a Time (2011)/Season 02","media":"video","properties":["art"]},"id":1} Any help would be appreciated... I've tried encoding the string, removing all samba authentication... is this a bug with MYSQL database? Where can I find information on how XBMC blocks json requests? Are root directories covered? for example source smb://0.0.0.0/TV, does that give access to all sub folders? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-07-04 XBMC gets the list of defined sources (based on sources.xml) and checks if one of them has a common base path with the path you passed in. But that shouldn't differ depending on where you sent it from. Can you check your sources.xml? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lunatixz - 2014-07-04 (2014-07-04, 06:41)Montellese Wrote: XBMC gets the list of defined sources (based on sources.xml) and checks if one of them has a common base path with the path you passed in. But that shouldn't differ depending on where you sent it from. Code: <source> passwords.xml is empty because everything is open share... BTW the source.xml is being path substituted and shared with multiple XBMC's |