2012-02-15, 12:45
Thanks, Montellese, my search-fu was weak today. The proposed solution seems OK.
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))
u'resume': {u'position': 0, u'total': 0}
"resume": { "position": 1849.088134765625, "total": 5024 }
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 haven't tested it with smartplaylists though.Code:"resume": { "position": 1849.088134765625, "total": 5024 }
{u'rating': 3.7999999523162842,
u'fanart': u'special://masterprofile/Thumbnails/Video/Fanart/d9db9c4e.tbn',
u'filetype': u'file',
[b]u'resume': {u'position': 0, u'total': 0},[/b]
u'label': u'Drive',
u'thumbnail': u'special://masterprofile/Thumbnails/Video/d/d9db9c4e.tbn',
u'file': u'C:\\Vid\xe9os\\Films\\Drive\\Drive.mkv',
u'year': 2011,
u'playcount': 0,
u'runtime': u'100',
u'type': u'movie',
u'id': 192,
u'trailer': u'http://hd.fr.mediaplayer.allocine.fr/nmedia/18/83/93/95/19243476_fa1_vf_sd_001.flv'
}
{u'moviedetails': {[b]u'resume': {u'position': 1271.79809570312[/b]5, u'total': 6024},
u'movieid': 192,
u'label': u'Drive'}}})
bthusby Wrote:It seems to have some performance issues on the ATV2.
Montellese Wrote:JSON-RPC does not yet provide any filtering functionality but once that's possible I'm sure scripts like watchlist can be improved to only fetch as much data through JSON-RPC as necessary. JSON-RPC is still very young but it's contantly growing (once the feature freeze is over ).
But still things can only be optimised so much and people have to keep and mind that a low-end device like an ATV2, an iPad and most embedded devices (compared to a normal computer) does not provide as much power as other systems do. Every system has a drawback, one has a fast boot-time but not much ponies and the other has a longer boot-time but enough power to handle anything you throw at it.
Tolriq Wrote:About this ticket
I've got a new need that comes with it, it was already discussed before i think but can't remember when, and get into this new need
Do you think it's possible for some of the player operations to add the support of PlayerId -1 that will pause / play whatever is currently running, even if music and pictures are running ?
See : http://forum.xbmc.org/showthread.php?p=1...ost1018502 for more details of why it may be needed.
One solution actually since playerid are limited to 1 2 3 is to send a batch of the 3 commands, but perhaps the -1 would be more coder friendly.