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 - Milhouse - 2013-11-20 (2013-11-20, 09:05)Montellese Wrote: I know the cause of the problem of the "no matching source found" but that shouldn't cause a crash. The crash was with an OpenELEC build for 18 Nov, but another build on 19 Nov now results not in a crash but the "no matching source found", so maybe it was a duff build on 18 Nov. If you know the cause of the "no matching source" then I'll stop investigating and I'll put it down to a one-off bad build since I didn't see the same unhandled exception with - in theory - the same xbmc code on Ubuntu. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-11-20 The "no matching source found" is solved by 24ce994a311668ff6fbb2840230c24405dd6300a. The crashes you saw might be related to the recent removal of CStdString in code a few days ago which resulted in quite a few crashes but most of them have been fixed now. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2013-11-20 (2013-11-20, 09:47)Montellese Wrote: The "no matching source found" is solved by 24ce994a311668ff6fbb2840230c24405dd6300a. The crashes you saw might be related to the recent removal of CStdString in code a few days ago which resulted in quite a few crashes but most of them have been fixed now. Excellent, that seems to have fixed it in OpenELEC, GetDirectory is working again - many thanks! RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2013-11-20 Hi. Butchabay have made some tests with my script (randomandlastitems) with Gotham and it seems that this release cannot resolve special://skin path : http://forum.xbmc.org/showthread.php?tid=122448&pid=1508162#pid1508162 How to reproduce this issue (tested with Gotham 13.0-ALPHA10 Git:20131117-7f212b9) : 1 - create playlists/video/<PlaylistName>.xsp file in skin folder 2 - Try to get movie list from this playlist : Code: _json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "video", "properties": ["title", "originaltitle", "playcount", "year", "genre", "studio", "country", "tagline", "plot", "runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", "art", "streamdetails", "mpaa", "director", "dateadded"]}, "id": 1}' %(PLAYLIST)) Error in xbmc.log : Code: 13:23:47 T:6976 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "special://skin/playlists/video/Parents.xsp", "media": "video", "properties": ["title", "originaltitle", "playcount", "year", "genre", "studio", "country", "tagline", "plot", "runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", "art", "streamdetails", "mpaa", "director", "dateadded"]}, "id": 1} The same playlist stored in special://profile/playlists/video/Parents.xsp is OK : Code: 13:28:36 T:6084 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "special://profile/playlists/video/Parents.xsp", "media": "video", "properties": ["title", "originaltitle", "playcount", "year", "genre", "studio", "country", "tagline", "plot", "runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", "art", "streamdetails", "mpaa", "director", "dateadded"]}, "id": 1} Using special://skin/playlists/video/Parents.xsp file is OK in Frodo : Code: 13:07:21 T:3380 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "special://skin/playlists/video/Parents.xsp", "media": "video", "properties": ["title", "originaltitle", "playcount", "year", "genre", "studio", "country", "tagline", "plot", "runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", "art", "streamdetails", "mpaa", "director", "dateadded"]}, "id": 1} Thanks. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2013-11-21 Latest Gotham (24ce994a311668ff6fbb2840230c24405dd6300a) - can anyone confirm if artists are being returned for "AudioLibrary.GetAlbums"? Eg. Code: {"jsonrpc": "2.0", "params": {"sort": {"order": "ascending", "method": "label"}, "filter": {"operator": "contains", "field": "album", "value": "abbey road"}, "properties": ["title", "artist", "fanart", "thumbnail"]}, "method": "AudioLibrary.GetAlbums", "id": "libAlbums"} Notice how the artist field is [""], when it should be: ["The Beatles"] It's the same without a filter too - no artitsts returned for any call to GetAlbums. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-11-21 (2013-11-20, 14:36)mikebzh44 Wrote: Hi. Probably because of the restrictions added to Files.GetDirectory for security reasons. Will see if "special://skin" is in the list of exceptions. (2013-11-21, 06:18)MilhouseVH Wrote: Latest Gotham (24ce994a311668ff6fbb2840230c24405dd6300a) - can anyone confirm if artists are being returned for "AudioLibrary.GetAlbums"? Maybe one of the fallouts of the musicdb changes. Can you create a trac ticket? Thanks. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2013-11-21 (2013-11-21, 08:53)Montellese Wrote: Maybe one of the fallouts of the musicdb changes. Can you create a trac ticket? Thanks. Done - ticket #14709. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-11-25 (2013-11-20, 14:36)mikebzh44 Wrote: Hi. Should be fixed with the latest commit. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2013-11-26 I have made some tests with XBMC (13.0-ALPHA10 Git:20131126-32d14df). (Platform: x86 Win32 32-bit), which is the latest nightlie available at the moment. Code: 14:49:55 T:7484 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "special://skin/playlists/video/Parents.xsp", "media": "video", "properties": ["title", "originaltitle", "playcount", "year", "genre", "studio", "country", "tagline", "plot", "runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", "art", "streamdetails", "mpaa", "director", "dateadded"]}, "id": 1} (2013-11-25, 09:38)Montellese Wrote: Should be fixed with the latest commit. Does your commit is merged with 13.0-ALPHA10 Git:20131126-32d14df or do I have to wait for a new release ? Thanks. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2013-11-26 (2013-11-19, 14:26)Montellese Wrote:(2013-11-16, 21:12)Tolriq Wrote: Just discovered a strange bug with JSON. Seems this bug also affected some other fields like year that is always 0 when requesting cast. Seems to be corrected with your commit but perhaps other things are broken too and should be checked. And do you know a workaround for Eden / Frodo for the Year at 0 ? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-11-26 The fields affected are year and playcount. They are the only ones with special handling that was different depending on whether all or just a single tvshow was retrieved from the database (requesting "cast" will force json-rpc to retrieve every tvshow separately). The only workaround is to either not get those fields through GetTvShows (only through GetTvShowDetails) or to use something like "cast" or "streamdetails" to force the detailed retrieval (which is also a lot slower). RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2013-11-26 Well not getting the cast in the main query and doing X further queries is very very slow But I guess no choice RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2013-11-26 Seems I missunderstood as the GetTvShowDetails have the same bug Only solution seems to query all in main list and then query all but cast to refresh data then just cast I wonder how this was not found since Eden RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2013-12-05 Seems like an old bug have come back Code: {"jsonrpc":"2.0","id":1,"method":"Files.GetDirectory","params":{"directory":"musicdb://years/","media":"music","properties":["title","thumbnail","fanart","rating","genre","artist","track","season","episode","year","duration","album","showtitle","playcount","file","mimetype","size","lastmodified"],"sort":{"method":"label","order":"ascending"}}} Code: {"id":1,"jsonrpc":"2.0","result":{"files":[{"album":"","artist":[],"duration":0,"fanart":"","file":"musicdb://years/1958/","filetype":"directory","genre":[],"label":"1958","mimetype":"x-directory/normal","playcount":0,"rating":0,"size":0,"thumbnail":"","title":"","track":0,"type":"song","year":1958},{"album":"","artist":[],"duration":0,"fanart":"","file":"musicdb://years/1959/","filetype":"directory","genre":[],"label":"1959","mimetype":"x-directory/normal","playcount":0,"rating":0,"size":0,"thumbnail":"","title":"","track":0,"type":"song","year":1959},{"album":"","artist":[],"duration":0,"fanart":"","file":"musicdb://years/1961/","filetype":"directory","genre":[],"label":"1961","mimetype":"x-directory/normal","playcount":0,"rating":0,"size":0,"thumbnail":"","title":"","track":0,"type":"song","year":1961},{"album":"","artist":[],"duration":0,"fanart":"","file":"musicdb://years/1963/","filetype":"directory","genre":[],"label":"1963","mimetype":"x-directory/normal","playcount":0,"rating":0,"size":0,"thumbnail":"","title":"","track":0,"type":"song","year":1963} RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2013-12-11 While investigating another issue with debug logging enabled, I noticed there is an addon executing the same json request every 2 seconds: Code: 18:27:34 T:2799494224 DEBUG: JSONRPC: Incoming request: [{"id":0,"jsonrpc":"2.0","method":"Player.GetActivePlayers"},{"id":1,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume","muted"]}}] Is there any way to tell the source of these requests (although it's almost certainly localhost), or which addon it is that is going nuts? The full log is here. Surely whatever addon is generating these requests doesn't need to request them every 2 seconds for the entire time a system is up? Edit: On a hunch, I disabled the WiFi on my Nexus 7 tablet which has Yatse installed... and the requests stopped. Will let the Yatse developer know. I'd have thought they could avoid repeated calls to GetActivePlayers/GetProperties by instead monitoring notifications (OnPlay, OnVolumeChanged etc.) |