def setResumeTime(self, resumetime, totaltime=None): totaltime = float(totaltime or self.getduration()) if (resumetime is not None and totaltime > 0 and 100 * resumetime / totaltime <= get_adv_setting( "video", "playcountminimumpercent") and resumetime > get_adv_setting("video", "ignoresecondsatstart") or resumetime == 0): self.setProperties(resumetime=resumetime, totaltime=totaltime)
def should_mark_as_watched(self): return (100 * self.marktime / float(self.list_item.getProperty("play_duration")) > get_adv_setting("video", "playcountminimumpercent"))
def should_reset_resume_point(self): return ( self.marktime < get_adv_setting("video", "ignoresecondsatstart") and (float(self.list_item.getProperty("play_resumetime")) > get_adv_setting("video", "ignoresecondsatstart")) )
def should_make_resume_point(self): # https://kodi.wiki/view/HOW-TO:Modify_automatic_watch_and_resume_points#Settings_explained return (self.marktime > get_adv_setting("video", "ignoresecondsatstart") and not self.should_mark_as_watched)