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 - dwagner - 2012-08-12 (2012-08-10, 09:20)Montellese Wrote:(2012-08-10, 00:56)dwagner Wrote: The problem is with the OSX build. I tried the latest OSX and Windows builds. The OSX build crashed on JSONRPC.Introspect and the Windows build did not. There are other JSON commands that crash for me on OSX. I read an earlier post where you mentioned you are going to try and test on OSX, so I guess it will be sorted once you get a chance to do that. Originally I tested over HTTP using Simple Rest Client in Chrome. I did a quick test now over TCP and the crash is still 100% repeatable with JSONRPC.Introspect. I'll file a trac report tomorrow, I can't recall all the methods that failed. I'll have to update the trac report as I discover them. If I can get XBMC code to compile on my Mac I would be glad to assist you. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - dwagner - 2012-08-12 (2012-08-09, 23:39)Montellese Wrote:(2012-08-09, 22:54)Millencolin007 Wrote: I understand that you want to remove the VFS handlers since it is a security risk and allows you to download almost any file from xbmc. Please don't kill the ability to download files. I also download info on music playlists and I download file info on add-ons to display to users. Ultimately I think a permissions system which you mentioned in another post is the best solution. As is you have added JSON methods that allow deleting items from the Database which is more dangerous then allowing download of a file. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - jmarshall - 2012-08-12 Why is removing an item from a database more dangerous than allowing access to download a file? The file itself is not deleted. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-12 (2012-08-11, 19:47)Tolriq Wrote: I finally got the database and it seems that's it the data in database that is not good and I suppose the json part suppose the data is correct UTF and does not do another utf encodeIn general XBMC should store everything as UTF8. If it doesn't the problem is somewhere else in XBMC and could also cause problems in the GUI when displaying the text. Another possibility is if a user manually changed stuff in the database (e.g. fixed a movie plot or something like that). Then it's no longer garantueed that the text is correctly encoded in UTF8 but that's the problem of the user manually editing the database or using a third party tool that writes directly to the XBMC database and messes up the encoding. (2012-08-11, 20:44)Tolriq Wrote: And another question that have nothing to do with thatI haven't considered pictures yet tbh. Will have to think on it and discuss with jmarshall. (2012-08-12, 01:25)Tolriq Wrote: And to finish for today, another very small bug that might worth being corrected for Frodo.Hm good question whether it should show "directory" and the path to the directory or "file" and the path to the file. The former would be normal behaviour in video files view while the latter would be the behaviour with "Stacking" enabled in video files view. (2012-08-12, 04:06)jmarshall Wrote: Why is removing an item from a database more dangerous than allowing access to download a file? The file itself is not deleted. Access to any file on your computer is faaaaar more dangerous than deleting something in the database. With the VFS handler you can access any file on your computer so also the password files on linux etc. IMO it's more important to fix such a security issue even if it means restricting access to other "valid" files for now until a better solution has been found (which is not so easy). RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-12 (2012-08-12, 09:19)Montellese Wrote:(2012-08-11, 19:47)Tolriq Wrote: I finally got the database and it seems that's it the data in database that is not good and I suppose the json part suppose the data is correct UTF and does not do another utf encodeIn general XBMC should store everything as UTF8. If it doesn't the problem is somewhere else in XBMC and could also cause problems in the GUI when displaying the text. I just got feedback from this user and he did not tamper the database, he just use NFO files then Xbmc scan. The Nfo files are effectively badly encoded but Xbmc should sanitize those and not insert in database incorrect data. http://yatse.leetzone.org/Castle.S03E01.nfo / http://yatse.leetzone.org/Castle.S03E02.nfo RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-12 (2012-08-12, 14:20)Tolriq Wrote: I just got feedback from this user and he did not tamper the database, he just use NFO files then Xbmc scan. In that case it's a problem with XBMC's NFO scanner and not JSON-RPC. Create a bug ticket on trac about it and attach the NFOs and if possible the database. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - dwagner - 2012-08-14 (2012-08-12, 04:06)jmarshall Wrote: Why is removing an item from a database more dangerous than allowing access to download a file? The file itself is not deleted. You are right. Dangerous is the wrong word, bored hackers could be more pests with the delete command. I am all for securing user content, but its not great to shut the door on programs that use the download feature legitimately. Montellese's idea of using a permission system is the right way to go, so its my hope that the XBMC Team waits to implement this before just closing the door on programs that have been using the download feature for some time. Even as a first step instead of having a complicated permission system just use a Device.PairChallenge via JSON like Boxee does in their API. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-14 A new little question Is there a way to get the current user sorttokens ? Or a way during queries to get the title with sorttokens applied ? I got lot's of request for supporting this and I'd like to be able to reproduce what they configure in Xbmc. (And I can't use a sort in the Json query since I do sync to local database and can later sort by year + title /sortitle or such) And as a bonus question but related, is there / will be a way to get the current language Xbmc is configured to ? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - N3MIS15 - 2012-08-16 I started looking at the new movie tags feature and was wondering if there are plans to add VideoLibrary.GetMovieTags method? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - N3MIS15 - 2012-08-16 Is there any way to parse thumbnail images that are taken from video files? example: image://video@smb%3a%2f%2funraid%2fRIPS%2fGame_Of_Thrones_Season_1_Disc_2_t00.mkv RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-08-16 Am I right in saying there is no way to retrieve the resume point of a file? I use GetFooDetails for movies and TV but am I missing a way to do it when the file is played and not in the library? Had a quick play with the filter PR. Awesome sauce on an awesome burger between an awesome bun Is the addon PR still going in this month btw? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Martijn - 2012-08-16 (2012-08-16, 23:45)Mizaki Wrote: Had a quick play with the filter PR. Awesome sauce on an awesome burger between an awesome bun Is the addon PR still going in this month btw? @Montellese Gonna need some help with that filter addition. Will ping you at IRC @Mizaki Not this month because merge window is closed. Next one is at the start of September RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-08-19 Sorry if I've missed something but can I not do a smart playlist type filter with a single item? For example: Code: {"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "filter": { "field": "title", "operator": "startswith", "value": "A" } }, "id": 1} Code: {"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "filter": { "and": [ { "field": "year", "operator": "endswith", "value": "" }, { "field": "title", "operator": "startswith", "value": "a" } ] } }, "id": 1} Also: Code: {"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "filter": { "year": "2000" } }, "id": 1} doesn't appear to work. "Invalid params" but I believe it should? Would you like me to continue testing or do you know about these? RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-08-19 (2012-08-14, 03:00)dwagner Wrote: You are right. Dangerous is the wrong word, bored hackers could be more pests with the delete command. I am all for securing user content, but its not great to shut the door on programs that use the download feature legitimately. Montellese's idea of using a permission system is the right way to go, so its my hope that the XBMC Team waits to implement this before just closing the door on programs that have been using the download feature for some time. Even as a first step instead of having a complicated permission system just use a Device.PairChallenge via JSON like Boxee does in their API.The problem is that the permission system would not really solve the problem of the current VFS handler. You can use VFS urls without previously using Files.PrepareDownload because you just need to URL encode the path you want to access and then append that path to the VFS url so a permission system on JSON-RPC level won't do any good. That's why we'll have to make major changes to it anyway and starting with removing any access to files directly is the first step. Then we can start considering which files we want to expose to clients and how. (2012-08-14, 12:13)Tolriq Wrote: Is there a way to get the current user sorttokens ? Or a way during queries to get the title with sorttokens applied ?No there isn't because these are window/view dependent. (2012-08-14, 12:13)Tolriq Wrote: And as a bonus question but related, is there / will be a way to get the current language Xbmc is configured to ?Yes when it will be possible to access (and modify) GUI settings through JSON-RPC. (2012-08-16, 02:26)N3MIS15 Wrote: I started looking at the new movie tags feature and was wondering if there are plans to add VideoLibrary.GetMovieTags method?Most likely there will be a VideoLibrary.GetTags method (similar to GetGenres) because I plan to extend tags to tvshows, episodes and musicvideos. (2012-08-16, 10:03)N3MIS15 Wrote: Is there any way to parse thumbnail images that are taken from video files?Not sure I understand the question. Is this a image:// URL you get from XBMC through JSON-RPC? or what are you trying to achieve? (2012-08-16, 23:45)Mizaki Wrote: Am I right in saying there is no way to retrieve the resume point of a file? I use GetFooDetails for movies and TV but am I missing a way to do it when the file is played and not in the library?Yup that's probably not possible. I'll have a look if I can add an extra call to retrieve that information if requested by the client. (2012-08-16, 23:45)Mizaki Wrote: Had a quick play with the filter PR. Awesome sauce on an awesome burger between an awesome bunGlad to hear that you like it. (2012-08-16, 23:45)Mizaki Wrote: Is the addon PR still going in this month btw?Totally forgot about it because I had a lot of stuff to do. (2012-08-16, 23:58)Martijn Wrote: @MontelleseI was away the whole week but I'll be in IRC again starting tomorrow. (2012-08-19, 01:21)Mizaki Wrote: Sorry if I've missed something but can I not do a smart playlist type filter with a single item? For example:Seems like I forgot about the case of a single filter where it is a bit of a pain to just define an "and" or an "or" property containing the actual rule. Will see that I can get it in. Thanks for the hint. (2012-08-19, 01:21)Mizaki Wrote: I've tried a few variations and can't get it to work which I think is "right" as there is no "and"/"or". I've found a workaround of:I don't follow. What are you trying to do? (2012-08-19, 01:21)Mizaki Wrote: Also:Nope year must be an integer value and not a string. So get rid of the double-quotes around 2000 and you should be good. (2012-08-19, 01:21)Mizaki Wrote: Would you like me to continue testing or do you know about these?Sure, any testing is good. I can only test so many cases and miss 99.9%. Let me know if you run into any more problems or have any ideas/suggestions. The implementation or rather the way you have to define the filter properties is a bit limited by the way smartplaylists work but I think it's ok. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-08-20 (2012-08-19, 23:51)Montellese Wrote:(2012-08-14, 12:13)Tolriq Wrote: Is there a way to get the current user sorttokens ? Or a way during queries to get the title with sorttokens applied ?No there isn't because these are window/view dependent. Not sure understand, those are configured in advanced settings and does not change. I suppose you mean they can be activated or not in the views but the list containing (The, A , An, ...) should not change. And getting this list from remotes will allow remotes to reproduce Xbmc sorting if the user want it. |