2021-06-24, 00:36
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
is:
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
But this also I think could be modified to not save resume point at the very end
scott s.
.
xml:<playcountminimumpercent>100</playcountminimumpercent>
<ignorepercentatend>0</ignorepercentatend>
This doesn't work as needed. After watching a library music video, after play completes what is in the MyVideos119.db
is:
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
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).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;
}
But this also I think could be modified to not save resume point at the very end
cpp:if (advancedSettings->m_videoIgnorePercentAtEnd > 0 &&
bookmark.totalTimeInSeconds - bookmark.timeInSeconds <
0.01 * static_cast<double>(advancedSettings->m_videoIgnorePercentAtEnd) *
bookmark.totalTimeInSeconds)
{
resumeBookmark.timeInSeconds = -1.0;
}
scott s.
.