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 - Montellese - 2012-11-26 The window can be opened using GUI.ActivateWindow so you can give it a try. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-11-26 no working, I did test with record exemple. When I use Json( {"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"pvrrecordinginfo"},"id":1} ) I get window with recording info but nothing inside (no working also when I trying to recording in same time) RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-11-26 AFAIK the PVR windows are a bit special right now and will be refactored after Frodo has been released. Furthermore dialogs usually expect additional parameters/information to be able to know what information they should show. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-11-26 oh ok thx for quick reply RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-11-26 Hi, I am making a new app to work with CommandFustion in a ipad. So far everything its working great, but i have a problem trying to set a subtitle. This works fine : Quote:self.rpc("Player.SetSubtitle", {"playerid":1, "subtitle":"on"},self.logReplyData);i have a function to send the json request and another function to get the log. But i tried this: Quote:self.rpc("Player.SetSubtitle", {"playerid":1, "subtitle":["on",0]},self.logReplyData);to set the subtitle with index 0, i get a error. Can someone help me to understand how to set a subtitle using the index ? Very thanks. Clayton RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-11-26 You don't need to set the on. The subtitle param can be either a string with "previous", "next", "off", "on" or directly an int as the index. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-11-26 Thanks Tolriq I tried in this way too, but the problem is : if we have a subtitle in the index 0, and try to setSubitle with index 0 again, this will turn off the subtitle. I tried to make a call to turn on the subititle with setTimeout, see : Quote: self.rpc("Player.SetSubtitle", {"playerid":1, "subtitle":0},self.logReplyData);Dont work, the subtitle is always off. I think i will have to make another Player.GetProperties, see what subtitle index its on and put a conditional to not make the request SetSubtitle to the subtitle in use. Very thanks for your help. Clayton RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-11-26 I just make some more tests but without luck to make this work. When i use : Quote:{"playerid":1, "subtitle":0}I can see in the log, the subtitle change to index 0, the subtitle is on too, but don show. So i tried first set the subtitle to index 0 and then force a subtitle on with a setTimeout (200ms) Quote:{"playerid":1, "subtitle":"on"}Dont work too, the subtitle dont show. If i have any subtitle showing in the display if i use Player.SetSubtitle the subtitle dont show anymore. I try to make the subtitle off first, then set the subtitle to index 0 and then set subtitle on. Dont work too. Very thanks for the help. Clayton RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-11-26 (2012-11-26, 19:20)claymic Wrote: Hi,Try Code: self.rpc("Player.SetSubtitle", {"playerid":1, "subtitle": 0, "enable": true},self.logReplyData); RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-11-26 Thanks Montellese, i have tried this too, dont work for me. I forgot to put a important thing, i am using Frodo Alpha 3. The strange thing is if i use : Quote:setTimeout(function(){self.rpc("Player.Seek", {"playerid":1,"value":"smallbackward"}, self.logReplyData);}, 200);then the subtitle show, because that i think there is nothing i can do about. If someone have interest in see the project i have two videos in youtube, one is showing the main project (to control the devices like tv, projector,...) the other one just show the begginer of the project for xbmc, its very diferent now, i will update the video later. I will not post here, i think its not the right place, but i can send the video link for mp. I will share the hole project in .js in the future and all the interface too, but CommandFusion its a comercial software,so... i dont know if will be useful for someone. Thanks for the help Clayton RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-11-26 Hum you need to know that Xbmc does prefetch a lot subtitles. When you change subtitles thge new one won't show for a few seconds (between 4 to 10 sometimes) so perhaps your tests are ok you just don't wait enough RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - zetterlund - 2012-11-27 Hi, I know this was asked earlier in the thread but I couldn't really find an answer to the question. Is it somehow possible to retrieve the uPNP file path somehow via the JSON API or via a uPNP? The PrepareFileForDownload with MovieId as parameter would be great way I think, where it returns the vfs path but also a uPNP path. With this data it would the be possible to send the file to any DLNA renderer for playback, which, IMO, would be pretty sweet. RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-11-27 Tuesday, November 27th 2012: Commits: 73a9b08f264c859434b8, f00ff50ec98445ac922a
RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-11-27 (2012-11-26, 23:31)Tolriq Wrote: Hum you need to know that Xbmc does prefetch a lot subtitles.Yes man, this is exactly what happens here. I just insert a setTimeout setTimeout(function(){self.rpc("Player.Seek", {"playerid":1,"value":"smallbackward"}, self.logReplyData);}, 200); this will force the subtitle to show. The strange thing is if i use "next" or "previous" the subtitle show immediately. Thanks for your help. Clayton RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-11-27 Another little question. Since i am trying to make everything using JSON (for Eden and Frodo Alpha 3), because i will adapt the app for the new frodo later, i was thinking if is possible to make this with JSON: - Audio and Subtitle delay - Subtitle position change (up and down) - Mark a video watched or unwatched I am using the http commands for now, but if there is anyway to make this with JSON let me know guys. Very thanks for the help. Clayton |