JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
spike411
Junior Member Posts: 12 Joined: Apr 2011 Reputation: 0 Location: Prague, Czechia |
2012-02-15 12:45
Post: #1711
Thanks, Montellese, my search-fu was weak today. The proposed solution seems OK.
|
| find quote |
mikebzh44
Posting Freak Posts: 1,117 Joined: Nov 2011 Reputation: 21 Location: Nantes - France |
2012-02-15 19:01
Post: #1712
Hello.
I want to filter partially watched movies (movies started to watched but not finished) in playlist so I use : Code: xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "video", "properties": ["year", "runtime", "file", "playcount", "rating", "plot", "fanart", "thumbnail", "resume", "trailer"]}, "id": 1}' %(_playlist))Code: u'resume': {u'position': 0, u'total': 0}When I click to view it, XBMC ask me if I want to watch it from start or from 21:12 So where can I found the information "this movie have been watched for 1272 seconds" ? Thanks.
(This post was last modified: 2012-02-15 21:18 by mikebzh44.)
|
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-02-16 01:22
Post: #1713
It should be in the "resume" property. I just tested it with one of my movies and this is what I get from VideoLibrary.GetMovies, VideoLibrary.GetMovieDetails and Files.GetDirectory:
Code: "resume": { "position": 1849.088134765625, "total": 5024 }Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
mikebzh44
Posting Freak Posts: 1,117 Joined: Nov 2011 Reputation: 21 Location: Nantes - France |
2012-02-16 09:52
Post: #1714
Montellese Wrote:It should be in the "resume" property. I just tested it with one of my movies and this is what I get from VideoLibrary.GetMovies, VideoLibrary.GetMovieDetails and Files.GetDirectory: I think that is a bug ![]() Request made by GetDirectory on a playlist : Code: {u'rating': 3.7999999523162842,Code: {u'moviedetails': {[b]u'resume': {u'position': 1271.79809570312[/b]5, u'total': 6024}, |
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,564 Joined: Oct 2003 Reputation: 138 |
2012-02-16 10:14
Post: #1715
The resume point is returned only if needsCast is set true in GetDetailsForMovie() et. al.
@Montellese: perhaps the additional info isn't being fetched for this field? Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-02-16 11:09
Post: #1716
Yeah it probably isn't fetched for smartplaylists but I'm not sure if I want to fix that. The problem with retrieving the extra info ("resume", "sets", "cast" etc) is that the time it takes to retrieve the information skyrockets. This is ok for GetMovieDetails because you only retrieve one movie and it's information. It is also acceptable for VideoLibrary.GetMovies because I can first check whether we actually need to retrieve the extra info and if not I don't set the needsCast flag in the request to the database. But I don't have this kind of information when retrieving smartplaylists (which is done in XBMC's VFS) so enabling that flag by default will slow down loading every smartplaylist independent of whether this happens through JSON-RPC or the XBMC GUI. So it kind of is a bug but only because it would worsen the smartplaylist experience overall.
Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
bthusby
Senior Member Joined: Feb 2011 Reputation: 1 Location: Norway |
2012-02-16 16:55
Post: #1717
Is JSON-RPC inherently a bit slow/heavy (bottleneck) when you have a large library of TV Shows?
I was given this explanation in another thread concerning the "On-deck" -feature, a script that shows which episodes I should watch based on what show I'm normally watching, and which is the next unwatched episode in those TV shows. The script seems to have some performance issues / delay on the ATV2. I also use a MySQL DB on a NAS for my libraries. BT :)
(This post was last modified: 2012-02-16 16:57 by bthusby.)
|
| find quote |
Martijn
Team-XBMC Joined: Jul 2011 Reputation: 115 Location: Dawn of time |
2012-02-16 16:57
Post: #1718
bthusby Wrote:It seems to have some performance issues on the ATV2. An ATV2 just hasn't got much ponies. If you want power better buy somethnig better Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules. For troubleshooting and bug reporting, make sure you read this first For your mediacenter artwork go to ![]() |
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-02-16 16:59
Post: #1719
Obviously the larger your library is the longer it takes to retrieve all the tvshows in it. Furthermore the watchlist script first retrieves all the tvshows and then for every tvshow it retrieves all the episodes. So the more tvshows you have the more it has to go through. And the more episodes there are in every show the longer it takes to process every show. You can't expect it to take the same time to go through all episodes of 10 tvshows compared to all episodes of 50 tvshows.
Furthermore the ATV2 isn't really popular for being very fast or having enough power to do everything XBMC offers. If you don't want to spend more money on your htpc you'll have to live with the fact that it won't be able to do everything as fast as if you spent more money on something faster/better. Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
bthusby
Senior Member Joined: Feb 2011 Reputation: 1 Location: Norway |
2012-02-16 17:14
Post: #1720
Wow, that is impressive response time from the XBMC team
![]() I have a Win 7 PC work horse with XBMC installed, sitting in the next room, but I like the ATV2 due to its simplicity. I don't have to turn on anything and wait for boot-up, and be nagged by updates from Acrobat, Sun and Itunes every other week... ![]() Maybe it is possible to optimize the JSON parsing by not go through the whole library each time? This obviously concerns the implementation of the script and not JSON-RPC as such. Is JSON-RPC implemented in XBMC using Python? And if so, is it simplejson which is used in Python, or the allegdely faster python-cjson or ultrajson? I'm unfortunately not an expert. A lot of people use ATV2, Ipad etc these days for XBMC, and I hope performance and efficiency will be addressed where it can
BT :)
(This post was last modified: 2012-02-16 17:23 by bthusby.)
|
| find quote |


![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)

![[Image: fanarttv.png]](http://trakt.us/images/thanks/fanarttv.png)


Search
Help