2012-02-14, 21:52
Big_Noid Wrote:Don't you already fetch playcount to filter watched/unwatched and resumed items? The script wouldn't run slower then if the option unwatched=true is set?No, propertie Count is the number of movie in the library/playlist and I don't make the difference between watched or unwatched.
When you set unwatched=True, I only return limit= movies that are unwatched (i.e. playcount > 0).
So I scan movie #1 to movie #Count and if playcount > 0 then I return the movie.
I stop the loop when I reach the end of movies or the number set by limit=
If you want to have the number of unwatched movies, I have to scan all the movies, even if I already have reach the limit= number, to set the unwatched propertie. So I guess the script will be slower.
But I can make a specific version and let you test it.
I will also ask in the JSONRPC thread if a simple way exists.