The viewing progress of a video is fetched from (and stored by) the Put.io API, and set per item in the Kodi interface. This allows items to be shown as unwatched/in progress/finished, as well as resuming viewing from where it was last stopped.
With less than a few percent left to watch of a video, it should be marked as "finished". The logic already exists, but is functionally broken.
When a video in Kodi is marked as both having been watched (playcount > 0) and having a resumetime (it is in progress of being watched), it is considered as being watched (rather than finished). Setting both properties with values from the Put.io API creates a "UI conflict".
This commit changes resumetime to not be set when a video is considered "finished".
To allow resuming further into a video, the "finished" percentage is reduced from 20% (12 minutes per hour) to 5% (3 m/h). This should cover regular use-cases while ignoring closing credits.
playcount
> 0) and having aresumetime
(it is in progress of being watched), it is considered as being watched (rather than finished). Setting both properties with values from the Put.io API creates a "UI conflict".resumetime
to not be set when a video is considered "finished".