2011-05-09, 20:41
I just have discovered that also "runtime" is not set in that case.
"Received value does not match any of the defined enum values"
hippojay Wrote:Is it possible to reference VideoLibrary.GetMovieSetDetails by setname as well as setid. Or GetMovies to return the setid.Yeah I know that this is a bit of a nuisance to get. The problem is that I wouldn't recommend using the "set" (and "cast") fields for GetMovies anyway because it adds quite a bit of extra time to retrieve that extra information for every movie. I'll see if I can provide the setid because I can see that it would simplify things quite a lot if you want to provide a movie browsing experience identical to the one in XBMC's movie library views.
I'm running getMovies to pull all the data down, but need to build a link to the set and then to the set contents. This means a second layer of menus, which isn't a problem - but becuase I have no persistance in plugins, at the moment it's going to require some code to pull out all sets, match the name, get the setid and push that into getMovieSetDetails.
hippojay Wrote:EDIT: Also, is there a way of returning all fields without having to specifiy them individually. I've lost count of the number of times i've ran into:
Code:"Received value does not match any of the defined enum values"
Montellese Wrote:Yeah I know that this is a bit of a nuisance to get. The problem is that I wouldn't recommend using the "set" (and "cast") fields for GetMovies anyway because it adds quite a bit of extra time to retrieve that extra information for every movie. I'll see if I can provide the setid because I can see that it would simplify things quite a lot if you want to provide a movie browsing experience identical to the one in XBMC's movie library views.
Quote:Hm you should be able to get all valid enum values for the "fields" parameter from introspect. What I'd do is copy them all into an array in my program and then remove the ones I don't need.
Quote:Maybe I can take a look at extending the error message to provide the actual enum value that failed. I guess that would certainly help in identifying the problem quickly.
hippojay Wrote:Thanks - I'm using XBMCs library to display the library so I have to grab pretty much all the data at once (certainly all the "extra" info like cast and directors and the like) - not ideal but that's what we have to live with..Don't you need the cast only when displaying the details for a single movie?
hippojay Wrote:Being able to reference the set by name would be ideal, especially if searching movies - as you are more likely to have the name then ID. However ID will do the job fine..AFAIK it will certainly be easier to provide the setid on GetMovies than providing the possibility to retrieve set details by name. Could you please create a feature request for this on trac and cc me so I don't forget? Thanks.
hippojay Wrote:A "nice to have" but not something desperately needed. The error message gives the array index and, as long as everyone remembers to count from 0, pin points the problem.
Montellese Wrote:Don't you need the cast only when displaying the details for a single movie?
carmenm Wrote:On another subject i saw the word "addon". And i have been thinking about something for quite sometimes. I want to write a plugin for xbmc to do specific tasks and i would like to control it remotely.
Could it be possible (feasible) for a plugin to add JSON methods? Something like "MyPlugin.DoAction". It would mean having a way to register for JSON method (with callback) on XBMC's side.
It would be an amazing addition but i dont know if it s even doable.
marksoccer Wrote:I am not getting any fanart associated with tv episodes in the now playing playlist. Is there any way to get the fanart from the tv show given the episode in the current playlist (Example, playing Seinfeld episode 34 and would like the fanart associated with the show Seinfeld)? I'm assuming I would need the tvshowid to accomplish this, but I don't think that is possible using the VideoPlaylist.GetItems method. Any ideas on how I could accomplish this task?
Montellese Wrote:topfs2 and myself have discussed this idea as well and when I rewrote the whole JSONRPC handling I tried to make it so that it will be possible to add such functionality. So it is on my (virtual) TODO list but not very high
tester = XBMC.sendMessage("{\"jsonrpc\":\"2.0\",\"method\":\"AudioPlaylist.Add\",\"params\":{\"item\":{\"songid\":"+search+"}},\"id\":1}");
tester = XBMC.sendMessage("{\"jsonrpc\":\"2.0\",\"method\":\"AudioPlaylist.Play\", \"params\": {\"item\":1}, \"id\":2}");
sooth Wrote:This looks fine as long as "search" is an integer variable of a valid songid.Code:tester = XBMC.sendMessage("{\"jsonrpc\":\"2.0\",\"method\":\"AudioPlaylist.Add\",\"params\":{\"item\":{\"songid\":"+search+"}},\"id\":1}");
sooth Wrote:Please try it with 0 for "item". IIRC the playlist entries start from 0 (as any index-based lists in most programming languages).Code:tester = XBMC.sendMessage("{\"jsonrpc\":\"2.0\",\"method\":\"AudioPlaylist.Play\", \"params\": {\"item\":1}, \"id\":2}");