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
|
- jasonvp - 2011-10-19 Montellese Wrote:Hm I tried playing a view movies and executed your jsonrpc request and the returned fanart path was always correct. Does this problem occur with every video you play? This is for TV Shows. I only have one Show in XBMC at the moment just to make it easier to test things. When I use "VideoLibrary.GetTVShows", "VideoLibrary.GetTVShowDetails" and "VideoLibrary.GetSeasons" for Fanart I get "special://masterprofile/Thumbnails/Video/Fanart/307790e7.tbn" for all of them which is correct but when use "Playlist.GetItems" and "Player.GetItem" I get "special://masterprofile/Thumbnails/Video/Fanart/9e82215b.tbn" which does not exist. "Thumbnails/Video/9/auto-9e82215b.tbn" does exist but this is the Thumbnail. I also deleted the .tbn files and downloaded them again but the same thing happens. Cheers Jason - mad-max - 2011-10-19 Hey guys, im struggling with the JSON stuff...basically I wanted an addon that queues the selected audio file and then make a skip to the next track... I found the appropriate commands in the wiki, but have no clue how to structure my addon... here is the original thread in the python section: http://forum.xbmc.org/showthread.php?tid=112742 would be great if somebody could take a look and give me a hint how to do syntax and stuff... cheers, mm - Montellese - 2011-10-19 jasonvp Wrote:This is for TV Shows. I only have one Show in XBMC at the moment just to make it easier to test things. Ah that stupid fanart at episode level problem again. This is a more or less known problem. The reason why it happens is that there is no fanart at episode level but only at tv show level so if someone requests fanart for an episode we have to do some extra work to retrieve it. It didn't work at the beginning, then it was partly fixed but it still doesn't work 100%. Best way to get the fanart for an episode is to retrieve the "tvshowid" property and then query VideoLibrary.GetTVShowDetails() with that "tvshowid" to retrieve the fanart. mad-max Wrote:Hey guys, As I don't have any clue about python coding I'm not sure what you are after. I can only provide help when it comes down to what you can do with jsonrpc and how you can do it best/easiest. Btw beware, the current documentation on the wiki is outdated and many methods have been moved/renamed. I'll try to update it ASAP. - mad-max - 2011-10-19 Montellese Wrote:As I don't have any clue about python coding I'm not sure what you are after. I can only provide help when it comes down to what you can do with jsonrpc and how you can do it best/easiest. Btw beware, the current documentation on the wiki is outdated and many methods have been moved/renamed. I'll try to update it ASAP. Thanks for taking time montelesse...yes, maybe you can help me interpreting the error message i'm getting while using the JSON-RPC... My Code: Code: import xbmc And the error: Code: 21:04:09 T:2504 NOTICE: -->Python Interpreter Initialized<-- thanks for your help... mm - Montellese - 2011-10-19 mad-max Wrote:Thanks for taking time montelesse...yes, maybe you can help me interpreting the error message i'm getting while using the JSON-RPC... Like I said the jsonrpc documentation on the xbmc wiki is heavily outdated. What version of XBMC are you using? In the latest nightly builds there is no "AudioPlaylist" anymore. But as soon as I know what version (Dharma 10.0/10.1 or pre-eden (ideally with the git commit hash) of XBMC you are using I can provide more detailed information. Best way to get a full documentation is to call JSONRPC.Introspect. That will return a list of all available methods, their parameters and what they return. - mad-max - 2011-10-19 Montellese Wrote:Like I said the jsonrpc documentation on the xbmc wiki is heavily outdated. What version of XBMC are you using? In the latest nightly builds there is no "AudioPlaylist" anymore. But as soon as I know what version (Dharma 10.0/10.1 or pre-eden (ideally with the git commit hash) of XBMC you are using I can provide more detailed information. Ok, there might bethe problem...I try AudioPlaylist but in my nightly from today there is no audioplaylist... will substitute this with only "playlist" and see what's going on... mm - jasonvp - 2011-10-20 Montellese Wrote:Ah that stupid fanart at episode level problem again. This is a more or less known problem. The reason why it happens is that there is no fanart at episode level but only at tv show level so if someone requests fanart for an episode we have to do some extra work to retrieve it. It didn't work at the beginning, then it was partly fixed but it still doesn't work 100%. Best way to get the fanart for an episode is to retrieve the "tvshowid" property and then query VideoLibrary.GetTVShowDetails() with that "tvshowid" to retrieve the fanart. Thanks Montellese. - jimk72 - 2011-10-22 Im implementing json control im my touchscreen remote program I am building and I have no means of returning json at this moment am only implementing sending commands using tcp port 9090. Is there any where in my install that I may find a list of current commands for the build I am using(oct 20). Or is there a post I can put into IE that will return the list? Or is there any return from tcp/udp transfers on a certain port I can look for or is the returns http only at this time? I have been so frustrated trying to implement this and then I realised I had 5 diff builds on my various pcs and mediaplayers. All up to date at this point - Montellese - 2011-10-22 jimk72 Wrote:Im implementing json control im my touchscreen remote program I am building and I have no means of returning json at this moment am only implementing sending commands using tcp port 9090. Is there any where in my install that I may find a list of current commands for the build I am using(oct 20). Or is there a post I can put into IE that will return the list? You can use a simple telnet program to open a TCP connection on a computer and then execute JSONRPC.Introspect. Or you can use the "Rest Client" extension for Google Chrome to send the jsonrpc request over HTTP to get the result in an easier readable format. I'm planning to update the jsonrpc wiki article later today so you may be able to take a look there. - jimk72 - 2011-10-22 Ok thanks. great job so far!! Once I got them all up to date everything started working. The one version was from over 2 years ago. After messing with PuTTy and seeing all the things going back and forth I think I am going to try and implement full control and access to Xbmc. I was shocked to see that it even notified me of when the screensaver started. Great work!! The hard part is Im using Delphi and an old version and Im not a student anymore so no discount and the new versions are insane Just have to do more research and learn a few more things about networking. Deleted files - Mizaki - 2011-10-22 Player.Open returns "ok" even if a file fails to play. I not sure if and where this should have failed. I moved an album. It's still in my library (not cleaned yet). I can add it to a playlist (same as in the GUI) but if I try to play it in the GUI I get an error. So, should I be able to add it to the playlist and should player.open return an okay result? - carmenm - 2011-10-23 Hi, I have updated my xbmc to the latest build and now a request like that {"method":"Player.GetActivePlayers","id":"1","jsonrpc":"2.0","params":[]} give me back a json object with an empty result. What i am doing wrong? Thanks - Montellese - 2011-10-23 Mizaki Wrote:Player.Open returns "ok" even if a file fails to play. I not sure if and where this should have failed."OK" is not an XBMC-specific answer but a JSON-RPC answer from the specification. It means that there was no error in your request and that all parameters etc were valid. It doesn't say anything about whether Player.Open has actually started playing an item or not. Currently there is no way for me to return more information in the JSON-RPC response because starting the playback happens asynchronously to the Player.Open call so after executing the method in JSON-RPC I don't know either whether it actually worked or not. Mizaki Wrote:I moved an album. It's still in my library (not cleaned yet). I can add it to a playlist (same as in the GUI) but if I try to play it in the GUI I get an error.If you haven't cleaned your database yet XBMC doesn't know whether the album with that albumid actually still exists or not. As long as it is part of the database it is considered as valid and existing. Therefore you can add it to a playlist without any problem (as XBMC doesn't do any existance check) but obviously when you try to play it, it will fail because the player can't find the file and therefore can't read and play it. So IMO that behaviour is correct to me. That's what cleaning the database is for (until XBMC has a source-watcher which auto-detects file deletion/creation/movements). carmenm Wrote:Hi,Do you have a player running? Since the Player rewrite I made a few weeks ago Player.GetActivePlayers returns an array of active players and as long as you don't have any active players that array is obviously empty. Please check the method definition in JSONRPC.Introspect to see how it works now. - Mizaki - 2011-10-23 Thanks. That all makes perfect sense. - carmenm - 2011-10-23 Montellese Wrote:Do you have a player running? Since the Player rewrite I made a few weeks ago Player.GetActivePlayers returns an array of active players and as long as you don't have any active players that array is obviously empty. Please check the method definition in JSONRPC.Introspect to see how it works now. Actually what bugs me most is that the response doesnt follow xbmc json specification. Especially i dont get a "failure" field(which i rely on just to know that xmbc answered correctly). Moreover, i was watching a movie! I ll post a complete response example this afternoon. Thanks for your quick answer. |