![]() |
|
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version +- XBMC Community Forum (http://forum.xbmc.org) +-- Forum: Development (/forumdisplay.php?fid=32) +--- Forum: Development (/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (/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 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
- othrayte - 2011-09-09 18:13 topfs2 Wrote:OnAdd is OnUpdate but with previously nonexistant id. If you receive an OnUpdate and you do not have the ID in your cache its OnAdd for you, its hard for us to track if you have it or not so we don't reallyI had thought that it OnAdd would be called when an item had been added to xbmc's library, so it wouldn't matter if I had it yet or not. What I need is more like OnAddedToXBMC. topfs2 Wrote:OnRemove gives ID, its a method which is meant to be used by someone with a cache, so you should store the ID so you know what was removed. ID's are considered static between sessions.I can see why you have it arranged this way, and that it would be hard to do it any other way so I suppose it makes sense. It's a bit of a shame though that I'll have to add a cache to TU just for storing info encase the item gets removed from XBMC's library. (I have a partially worked idea for caching all of TU's data, but it is much larger in scope, won't be finished for ages and doesn't currently store the local item id; because TU doesn't care if you have multiple copies only that you have one, so it stores by the imdb or equivalent.) - topfs2 - 2011-09-09 18:42 othrayte Wrote:I had thought that it OnAdd would be called when an item had been added to xbmc's library, so it wouldn't matter if I had it yet or not. What I need is more like OnAddedToXBMC. Its better to just send OnUpdate, as you might have missed the OnAdd due to being offline. IMO its better if we "force" you to do a full fetch (i.e. update the cache) on first launch, then its easy for you to find out which is added. An example, say you connect, we add X, you disconnect, we remove X, you connect, we add X. In this case its for you OnUpdate but we send OnAdd, so you need to coop with this case, might aswell always coop with OnUpdate othrayte Wrote:I can see why you have it arranged this way, and that it would be hard to do it any other way so I suppose it makes sense. It's a bit of a shame though that I'll have to add a cache to TU just for storing info encase the item gets removed from XBMC's library. Yeah we are kindof required to do this. As stated elsewhere in this thread we have had the option of either send everything or send just minimal amount for queries in notifications and we have opted for the minimal route. Most often a client which listens to onremove has some form of cache, for you that would be on first connect do a full req on ID and imdb-id, then you keep listening to OnRemove. If you do that full request on startup you'd know when OnUpdate means newly added VideoLibrary.GetMovieSets - slash - 2011-09-10 18:58 Hi, Just to validate, VideoLibrary.GetMovieSets will return only the sets that have at least 2 movies assigned. Right ? I believe it's a an XBMC standard behavior. Can anyone confirm ? Thanks / Inconsistency between AudioLibrary and VideoLibrary with empty DB - gertjanzwartjes - 2011-09-11 11:53 I noticed a difference between the AudioLibrary and VideoLibrary namespaces with a fresh XBMC instance without any database for video or audio. VideoLibrary.GetTVShows as well as GetSeasons and GetEpisodes nicely return a result object flagging there are no TV shows. However, AudioLibrary.GetArtists or GetAlbums, GetSongs return a result object being "null". Is this deliberate? Maybe nobody noticed it, so I just wanted to share my experience. It's of course easy to guard against, but I thought maybe XBMC's JSON-RPC interface would or should always return a non-null result object for valid requests. Thanks - Montellese - 2011-09-11 14:12 gertjanzwartjes Wrote:I noticed a difference between the AudioLibrary and VideoLibrary namespaces with a fresh XBMC instance without any database for video or audio. VideoLibrary.GetTVShows as well as GetSeasons and GetEpisodes nicely return a result object flagging there are no TV shows. However, AudioLibrary.GetArtists or GetAlbums, GetSongs return a result object being "null". Thanks for the report. Could you please create a bug ticket on http://trac.xbmc.org and CC me so that I don't forget. - HardcoreWR - 2011-09-11 17:09 Could someone please help me with Application.GetProperties Code: "Application.GetProperties": {translates for me to Code: '{ "jsonrpc": "2.0", "method": "Application.GetProperties", "params": [{ "properties": "volume" }], "id": 1 }'I really can't figure this out ... Busy with this single JSON rule for like 6 hours now, and getting pretty annoyed by not getting it to work.. If someone could point me in the right direction, I would appreciate it .. I'm using XBMC PRE-11.0 Git:Unknown (Compiled: Sep 11 2011) - Montellese - 2011-09-11 17:19 HardcoreWR Wrote:Could someone please help me with Application.GetProperties The "properties" parameter must be an array. What you did is to provide the "params" field as an array and the "properties" value as a simple string property. To achieve your goal you should try: Code: { "jsonrpc": "2.0", "method": "Application.GetProperties", "params": { "properties": [ "volume" ] }, "id": 1 }The value of the "params" field is an object containing all parameters (in this case only "properties") and the value of "properties" is an array of all properties you would like to retrieve. - HardcoreWR - 2011-09-11 17:25 Montellese Wrote:The "properties" parameter must be an array. What you did is to provide the "params" field as an array and the "properties" value as a simple string property. To achieve your goal you should try: Mannnnnnnnnnnnnnnnn, I really don't know how to thank you!!! This indeed does the trick .. thanks for your explanation. I just started working with JSON, so not everything is very clear to me yet
AV Control Integration Offer/Concerns/Etc - Raginn8 - 2011-09-12 01:43 I developed a heads-up version of control for XBMC (HTTP) within the AMX world sometime ago and have been using it with multiple clients for well over a year now. Lately I've been messing around with the JSON protocol in an attempt to create a head-less version of the module, and so far I like what I see however I do have some concerns/requests. For instance when doing a GetDirectories it would be great to have a parameter that allows to request only directories, only files, or both. Currently the response is rather clunky. I can also offer insight to what a typical AV client/server solution would include in terms of protocol (queries, system calls, etc). I feel that the XBMC environment is nothing short of amazing, however from a high-end AV integration stand point it appears a bit stunted. My connections within this forum are none existant as I've only recently posted much of anything, however moving forward I would love to make a larger contribution. That said if there are any persons working within the development environment who would like to team up in this effort please let me know. - Montellese - 2011-09-14 16:38 Tuesday, September 13th 2011: Commits: 6 commits from 0f12ea73fcef4b65ac89 to c93ea68b5428a9109140 Although there is no change in the functionality and the feature set of the jsonrpc API I finally found the time to further improve xbmc's implementation of JSON schema by covering more parts of the JSON schema specification. The newly added functionality include
|