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 - Samtronic - 2014-03-06 Hi ! Is it possible in json to list movie based on cast name. Thanks Steven RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-03-06 (2014-03-06, 21:12)Samtronic Wrote: Hi ! You can try to use a filter using the "actor" filter. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Samtronic - 2014-03-07 This works perfectly with the actor filter Thanks RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - jez500 - 2014-03-08 (2014-02-16, 17:13)Montellese Wrote:(2014-02-13, 14:58)jez500 Wrote: 3. Persistent storage - I am pretty sure this is a feature request however I might have just missed it too. I would love a way to save/retrieve some data on the host via the api. something like storage System.setVariable {key: value} and System.getVariable {key}. I have heaps of cool ideas if such a thing existed (eg. web ui settings, who played that song and many more ). Any suggestions?I don't understand what exactly you are after. Hi Montellese, Thanks for the responses, all good to know. With the "persistent storage" it's probably easiest to explain it with an example... Say in my web interface I want the user to be able to select a color scheme, at the moment I can only save this setting in local browser storage, meaning if they switch browsers then that setting is lost. I would like to be able to store this setting server side (in xbmc) so if the user uses another browser, I can pull the setting from xbmc and apply it accordingly. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-03-08 (2014-03-08, 06:09)jez500 Wrote: Hi Montellese, Over a year ago I wrote some python modules and other code to allow webinterfaces to use python including session and cookie handling. Unfortunately by the time I was done the whole python interface was changed and I never got around to adjust my code because the new code is completely different. But I still want to make that happen one day. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - jez500 - 2014-03-08 (2014-03-08, 09:15)Montellese Wrote:(2014-03-08, 06:09)jez500 Wrote: Hi Montellese, Ahh ok, yeah I was thinking it might have to be the job of another addon. Ok cool, I might investigate a 'companion' module in the future if you don't beat me to it. Thanks! RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2014-03-10 Artistid is not returned when using Files.GetDirectory function on "Songs" smart playlist : Code: _json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "music", "properties": ["artistid","albumid","dateadded"]}, "id": 1}' %(PLAYLIST)) Informations returned : Code: {u'filetype': u'file', u'label': u'Total Breakdown', u'albumid': 3, u'file': u'smb://READYNAS/media/Music/Brad Sucks/2008 - Out of it/07_-_Brad_Sucks_-_Total_Breakdown.mp3', u'type': u'song', u'id': 1233}, Does Wiki is not up to date : http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#Files.GetDirectory http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#List.Fields.Files Tested with Frodo 12.3 and 13.0-BETA2 Git:20140310-64a9cb9 RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - ben- - 2014-03-12 (2012-07-02, 11:56)Millencolin007 Wrote: Setting the movie as unwatched does not work. Tried the following two requests I just tried this in Gotham Beta-1. Setting lastplayed to "" doesn't seem to be working for me. The API call returns OK, but when querying the details immediately after the call, the old lastplayed date string remains. Is there a special way to assign a string value to empty now? Clicking the marked as unwatched button in the UI returns the value to "" as expected. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-03-12 (2014-03-10, 13:18)mikebzh44 Wrote: Artistid is not returned when using Files.GetDirectory function on "Songs" smart playlist :I'll look into it when I have some time but a lot has changed in the music database and I'm not familiar with it anymore at all. And yes the documentation on the wiki is not up-to-date, (2014-03-12, 02:49)ben- Wrote:(2012-07-02, 11:56)Millencolin007 Wrote: Setting the movie as unwatched does not work. Tried the following two requests Thanks for the report. Looks like all properties/fields that expect a date/time will fail with an empty value. I'll try to fix it ASAP. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - ben- - 2014-03-12 (2014-03-12, 08:57)Montellese Wrote: Thanks for the report. Looks like all properties/fields that expect a date/time will fail with an empty value. I'll try to fix it ASAP. Great, thanks! Just to clarify, I would use "" (the empty string) to clear the field? This seems correct to me since the null value is used to ignore the attribute altogether when setting details. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-03-12 (2014-03-12, 18:21)ben- Wrote: Great, thanks! Just to clarify, I would use "" (the empty string) to clear the field? This seems correct to me since the null value is used to ignore the attribute altogether when setting details. Yup that's correct. But there is some logic in the database that doesn't let you reset lastplayed when the playcount is greater than 0. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - ben- - 2014-03-12 (2014-03-12, 19:06)Montellese Wrote:(2014-03-12, 18:21)ben- Wrote: Great, thanks! Just to clarify, I would use "" (the empty string) to clear the field? This seems correct to me since the null value is used to ignore the attribute altogether when setting details. That constraint is logical since there could never be a case where play count is non-zero with no last played time. I'm implementing "mark as watched" and "mark as unwatched" via the JSON API so I will always be modifying both attributes at the same time. Thanks again! RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-03-13 (2014-03-12, 19:15)ben- Wrote:(2014-03-12, 19:06)Montellese Wrote:(2014-03-12, 18:21)ben- Wrote: Great, thanks! Just to clarify, I would use "" (the empty string) to clear the field? This seems correct to me since the null value is used to ignore the attribute altogether when setting details. PR4405 should take care of the problem. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2014-03-15 There was some discussion about this previously, but is it really the case now that you can only call Files.GetDirectory on paths within your sources (as defined in sources.xml)? The thing is, I have a MySQL setup which is using a Raspberry Pi as the "scraper" (it's on 24x7 etc.) which has a fully defined sources.xml, and all my other clients (which don't do any scraping) haven't been setup with a sources.xml at all. It's working great, apart from JSON which doesn't allow any calls to GetDirectory on the clients without a sources.xml. Is there no other way to validate/verify the path being requested other than against sources.xml? Wouldn't it be better to validate the requested path against whatever sources/paths are in the database, which would mean sources.xml isn't required? Granted it's not a big deal to duplicate the sources.xml on every client just for GetDirectory to work, although I had hoped to eliminate sources.xml from every non-scraping client just to prevent them from performing any unintended scraping. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2014-03-15 Well in the end it's a problem to duplicate since users often add then by hand with a different case Leading to no access via VFS for example see https://github.com/xbmc/xbmc/pull/4391 And furthermore if they scrape one movie on one different case host then others do not have access to and there's no way to recover from this appart drop of source and all database then full rescrape after having corrected all |