HTTP API

Get watched/unwatched
Am trying to add in functionality to a management script that will purge watched TV episodes after a period of time.

To do this, I need to get a complete list of TV episodes along with their watched status, ideally in a single request.

The closest I seem to be able to get is:

http://127.0.0.1:32400/library/sections/2/search?type=4

Which returns all episodes, but doesn't include a viewCount attribute.

Is there another request I could be doing to get this? Or i s something that could be added to the API?

Hi!

I looked at the output of http://****127.0.0.1:32400/library/sections//search?type=4 on my machine and I do see the viewCount attribute on some, but not all elements. It looks like the attribute is available if the viewCount >=1 and is missing if it’s an unwatched episode.

Try this:



http://127.0.0.1:32400/library/sections/2/allLeaves

Sorry, you’re right, the viewCount was there, just only for watched episodes (I didn’t scroll down far enough!).



Thanks for the proper way to do it Jam, much appreciated.




Did you have any luck with that script you are looking to create? I was thinking about the same thing. Any progress?

Best,

J

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.