Kodi Community Forum
Mark video "watched" at completion -- possible? - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Video Support (https://forum.kodi.tv/forumdisplay.php?fid=264)
--- Thread: Mark video "watched" at completion -- possible? (/showthread.php?tid=363238)

Mark video "watched" at completion -- possible? - scott967 - 2021-06-24

I want to show a video as watched only when it is completely viewed.  In my advancedsettings I try:

This doesn't work as needed.  After watching a library music video, after play completes what is in the MyVideos119.db
playCount Null
resumeTimeInSeconds 93.349683
totalTimeInSeconds 93.753

from the wiki I guess keeping a resume point is expected but it seems playcount should be increased?

It seems like a useful feature to have a way to mark a video watched at the end and also no resume point but maybe this isn't supported?  I don't really want to use 99% though maybe 99.99% would be OK.

update:  So I found in application.cpp
void CApplication::OnPlayerCloseFile(const CFileItem &file, const CBookmark &bookmarkParam)
  bool playCountUpdate = false;
  float percent = 0.0f;
  percent = bookmark.timeInSeconds / bookmark.totalTimeInSeconds * 100;
  if (fileItem.IsVideo() && advancedSettings->m_videoPlayCountMinimumPercent > 0 &&
       percent >= advancedSettings->m_videoPlayCountMinimumPercent))
    playCountUpdate = true;
So I guess in this example percent is 99.5698 and playCountUpdate remains false.  IMHO this should modified to allow some error in how the resume point has been calculated (or that calculation fixed, but this seems more expedient).

But this also I think could be modified to not save resume point at the very end
  if (advancedSettings->m_videoIgnorePercentAtEnd > 0 &&
      bookmark.totalTimeInSeconds - bookmark.timeInSeconds <
          0.01 * static_cast<double>(advancedSettings->m_videoIgnorePercentAtEnd) *
    resumeBookmark.timeInSeconds = -1.0;

scott s.

RE: Mark video "watched" at completion -- possible? - Klojum - 2021-06-24

(2021-06-24, 00:36)scott967 Wrote: This doesn't work as needed.

It already works fine for most people with Kodi's (internal) default settings. Demanding a 100% percentage that the video is deemed completed is wrong. There are always minute differences, as in milliseconds where videos are stopped at the end. Your 100% is like asking a car driver to stop with a single millimeter from a stop sign.

You can play with the percentages in the advancedsettings.xml file, but don't demand exactly 0% or 100% accuracy. 1 and 99 should be accurate enough even for very short videos.

This forum uses Lukasz Tkacz MyBB addons.