Dis90 / plugin.video.discoveryplus

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

fixes a couple issues with resume/completed episodes #46

Closed yeahme49 closed 3 years ago

yeahme49 commented 3 years ago

Kodi wants playcount as an int, not str so previously if you finished an episode on the website, it wouldn't properly reflect as watched in Kodi. Also removed the jsonrpc to update the resume time since it doesn't appear to be needed anymore. Not sure if something changed in kodi, but I know when testing the US version, if jsonrpc wasn't used to set the resume time, it wouldn't resume properly. Lately I've been having an issue where if I watched part on the website and then went to Kodi, it wouldn't show the episode thumbnail or any info about the episode. Removing the jsonrpc resolve that issue and the episodes still resume at the proper time.

Dis90 commented 3 years ago

Playcount needs to be as str. See this discussion https://forum.kodi.tv/showthread.php?tid=352049&pid=2927742#pid2927742 I don't know if something in Kodi has changed after that discussion but I checked Netflix add-on code and it also sets playcount as str.

Maybe we can completely delete that jsonrpc method not just comment it out?

yeahme49 commented 3 years ago

I will have to do some more testing with playcount. When I was watching some stuff yesterday it was not marking items as watched while it was a str but when I changed it to an int, it worked. I tried looking through kodi github to see if something had changed before matrix was released and not seeing anything. But I will test with Leia and see what happens, maybe it needs to be a Matrix only change. I will also test if jsonrpc possibly needs to be there with Leia or if it works properly without.

yeahme49 commented 3 years ago

Did some more testing. Not sure why I thought having playcount as a str wasn't working, but I tested it on my Matrix install, a fresh Leia install and a fresh Matrix install and it works properly to mark an episode watched. Removed the jsonrpc completely. It doesn't work at all on Leia, because you can't use Files.SetFileDetails on plugin URLs in Leia, that was fixed in Matrix. Unsure why the jsonrpc stopped working properly on Matrix, but I tested a fresh install of Matrix with just setting the listitem resume data and it resumed fine. It does not resume properly in Leia, so something changed between Leia and Matrix when having resume data in the listitem.

So as of now, marking something as watched works properly in Leia and Matrix. Resuming something started through the site or app only works on Matrix.

Dis90 commented 3 years ago

Thank you for testing. I think it is this PR what fixed resuming in Matrix https://github.com/xbmc/xbmc/pull/17993 I don't know if there's backport for Leia, probably not.