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-08-05 topfs2 Wrote:Anyways, try JSONRPC.Version on their server, it really should return 2 otherwise they have merged development builds (which isn't good). This was from a couple of months ago. Boxee Box returned Code: {"id":1,"jsonrpc":"2.0","result":{"version":1}} So what is 1? Dharma in development? System info Code: {"id":1,"jsonrpc":"2.0","result":{"System.BuildVersion":"1.1.2.19250-8cbeb5c"}} Code: {"id":1,"jsonrpc":"2.0","result":{"System.BuildDate":"Jun 19 2011"}} - topfs2 - 2011-08-05 yeah version 1 is Dharma in development, any of the odd numberings are impossible to target as they stretch over almost a year of development I'll see if I can start some discussion internally and possibly with boxee to see if we can resolve this somehow (so that each possible merge they do has a proper number and not a hit n' miss as the odd numbers are). EDIT: For now I guess you can assume boxee if version 1, but its hardly a good solution in the future so will need to come up with something better - topfs2 - 2011-08-05 jasonvp Wrote:The reason I asked was because I initially created a Widget for a Boxee Box for a friend and that got me interested in XBMC. So rather than reinventing the wheel I thought I would just add to my already made Widget for use with XBMC. This is also another reason why I'm using "System.GetInfoLabels" a lot because the Boxee Box has limited JSON commands. Ah, well I like the idea of being able to mass fetch state variables so we might keep it somehow. Currently we are using the GUI InfoManager which I don't like that much but we could probably make a bit of a json-rpc specific variant when core gets cleaned up a bit. jasonvp Wrote:When using "AudioPlayer.State" with the Boxee Box it returned the below even though no player was active. Yeah might aswell, because I agree with you that if we have [Audio|Video]Player those are virtual and probably shouldn't error. The merged might make sense to error so we need to have the discussion. And its summer time so lots of devs are on vaccation so we will easily forget about it without a trac ticket - jasonvp - 2011-08-06 Thanks topfs2. I created a Trac Ticket (Ticket #11815). Cheers Jason - dann0 - 2011-08-07 topfs2 Wrote:Hmm, never tried this tbh. It sounds like partly a bug. Ideally it should behave as in GUI (perhaps with the option to query all artists no matter the setting). Please start a bugreport / feature request with a detailed list of how to reproduce (if you could upload your or a sample database that would also be quite nice, its up to you) and cc me and Montellese. Ticket #11816 thank you - Zenshi - 2011-08-08 Hello all, I'm trying to retreive the thumbnails for all the tv show seasons and episodes that I currently have in my library using a script, but can't seem to make it work... The code i'm using is, for Seasons Thumbs, Code: {"jsonrpc": "2.0", "method": "VideoLibrary.GetSeasons", "params": {"fields": ["thumbnail"] }, "id": 1} Code: {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": {"fields": ["thumbnail"] }, "id": 1} I assume that "thumbnail" field exists for both methods? Cheers, Zenshi. - thedroid - 2011-08-08 topfs2 Wrote:we could add a GetArtist(allow_various=true) type of thing though which forces it to return them no matter the setting. I think having a force would be better, but it may be better to have GetArtist return all artists (as it does now) and GetArtist(albumartist=true) returns only Album Artists. Just my 2c. - topfs2 - 2011-08-08 thedroid Wrote:I think having a force would be better, but it may be better to have GetArtist return all artists (as it does now) and GetArtist(albumartist=true) returns only Album Artists. Sorry if I wasn't clear, that flag I suggested is force. if omitted we would use the one in settings, if true we would have various artist in listing and if false we wouldn't - thedroid - 2011-08-08 topfs2 Wrote:Sorry if I wasn't clear, that flag I suggested is force. if omitted we would use the one in settings, if true we would have various artist in listing and if false we wouldn't I understood it as you described, but my point is as follows :- If I am making that call from a external program, and I want to get just AlbumArtists, how would I know what "GetAlbums" on its own is actually going to return as it will be dependant on the gui setting (is there an infolabel for this)? I guess the ultimate solution would be three versions i.e. GetArtist(use_gui=true) , GetArtist(album_artist=true) and GetArtist. - topfs2 - 2011-08-09 thedroid Wrote:I understood it as you described, but my point is as follows :- If I am making that call from a external program, and I want to get just AlbumArtists, how would I know what "GetAlbums" on its own is actually going to return as it will be dependant on the gui setting (is there an infolabel for this)? I guess the ultimate solution would be three versions i.e. GetArtist(use_gui=true) , GetArtist(album_artist=true) and GetArtist. yeah that was what I wanted but with just a different syntax Unless I'm missunderstanding you? GetArtist(album_artist=true) : Fetch ever single artist no matter if its various GetArtist(album_artist=false) : Only fetch "pure" artists GetArtist() : Use default from GUI. Personally I prefer not having more than one bool because it gets rather unclear what you want if you do GetArtist(use_gui=true, album_artist=true). Obviosly we could use an enum though and have album_artist="default" or something, but I personally think bool and omit is better, but will discuss it a bit internally Tangent of the topic, I'm also somewhat thinking that we should perhaps flag the items too, so that a client could do post-fetch filtering if they so desire, so each artist has a flag which states if its various or not. And when settings is wrapped the gui setting will be available there. - thedroid - 2011-08-09 topfs2 Wrote:GetArtist(album_artist=true) : Fetch ever single artist no matter if its various That is exactly what I was thinking of. Sorry sometimes it takes a while for my brain to engage (and then only with a lot of prodding from other people) :-) . - topfs2 - 2011-08-09 thedroid Wrote:That is exactly what I was thinking of. Ah great, I was worried I had missed a use case (never used the feature before so am very unsure on it ). Always good to bounce ideas. Makes me wonder though if it isn't clear enough to use the bool + omit and perhaps we will have to do an enum string instead if its easier to instantly understand. - Wanilton - 2011-08-09 Topfs2, i have little sugestion for Json in music, it´s possible get info about one tag custom field in music (example: Language), I use this resouce for listen appropriate info TTS Voice using voxcommando, example: Whats song is this? language english, i have tts voice in english read info for me in native language track, in this case i Listen "This music is Made up My mind", for now I use field lyrics and http for implement this: TTS = Text to Speech http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=getcurrentlyplaying Filename:musicdb://3/611/9209.mp3 PlayStatuslaying SongNo:0 Type:Audio Title:Made up My Mind Track:1 Artist:Savoy Brown Album:A Step Further Genre:Blues Rock Year:1969 URL:C:\Shared Music\Savoy Brown\A Step Further (1969)\01 - Made Up My Mind.mp3 [b]Lyrics:EnglishUS Bitrate:193 Samplerate:44 Thumbpecial://masterprofile/Thumbnails/Music/f/ffbc9937.tbn Time:00:14 Duration:03:07 Percentage:7 File size:4723992 Changed:False But this great if one way for this via Json.. - topfs2 - 2011-08-09 Wanilton Wrote:Topfs2, i have little sugestion for Json in music, it´s possible get info about one tag custom field in music (example: Language), I use this resouce for listen appropriate info TTS Voice using voxcommando, example: Sure, make a feature request and cc me and Montellese, I'm sure we could add lyrics as a possible field (and either have lyrics be an object with language and text members or have another field as lyric_language) - jitterjames - 2011-08-09 Actually, I think what Wanilton really wants is access to the custom fields, like those that are used in MediaMonkey. There are tags called custom1 custom2 etc., but also he wants to request the contents of a tag by name as opposed to doing a general request and receiving all info for the song in one shot. I have not looked too closely at the JSON spec yet so I don't don't know if this is already possible... |