Dis90 / plugin.video.discoveryplus

discovery+ add-on for Kodi
65 stars 13 forks source link

Tracking watched date/time etc. #61

Closed iPFT closed 2 years ago

iPFT commented 2 years ago

Hi great plugin

Quick question as I can't find any formal documentation for the API and I know this is an unofficial plugin - is there anything in the json files that can determine the watch status of a user - e.g. something as basic as netflix viewing activity which shows date/time watched and title https://www.netflix.com/viewingactivity

https://disco-api.discoveryplus.co.uk/users/me/allData shows the id and progress, but would be great to know about date/time/title so things can be scrobbled into something like trakt/imdb etc.

Thanks

Dis90 commented 2 years ago

Wow I didn't know this page. As far I know there's no page which lists all played videos.

Maybe easiest way would be to use videoId found in allData with this url https://disco-api.discoveryplus.fi/content/videos/videoId?decorators=viewingHistory&include=genres,images,primaryChannel,show,show.images Replace videoId with id found in allData also .fi -> co.uk

There's lastStartedTimestamp and information of episode and show.

Edit. With this page you can use comma separated list https://disco-api.discoveryplus.fi/content/videos?decorators=viewingHistory&include=images,primaryChannel,show,genres,contentPackages&filter[id]=videoId,videoId2&filter[isPlayable]=true

iPFT commented 2 years ago

Perfect thanks @Dis90

I just need to write some script to loop my allData, pull the page from the second url, and see if there’s a way to upload to imdb or Trakt ;-)

Dis90 commented 2 years ago

Yep. If you run issues with page not listing all watched videos then you probably need to add &page[size]=100&page[number]=1 and change page number to 2 to get next 100 videos.