Kodi Community Forum

Full Version: Get playCount with jsonrpc VideoLibrary.GetMovies or get list of unwatched movie
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm writing a small script add-on to play an unwatched movie from my library.

So far I've gotten a complete list of all my movies by using the jsonrpc VideoLibrary.GetMovies call:

{'jsonrpc': '2.0', 'method': 'VideoLibrary.GetMovies', 'params': { 'properties': [ 'file' ] }, 'id': 'libMovies'}

I just can't seem to figure out how to filter by playCount, which is found in the movieview table/view in the database. I don't even know if the VideoLibrary.GetMovies method allows for that filter.

Anyone have any pointers? Or maybe another way to get a list of all unwatched movies?
Thanks. Just what I was looking for Smile