Skip to content

Commit

Permalink
changed: <ignoreatstart> to <ignoresecondsatstart> and bump to 180 se…
Browse files Browse the repository at this point in the history
…conds by default. Also <ignoreatend> is not <ignorepercentatend> which defaults to 8%. Ticket #10207.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@34346 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
(cherry picked from commit ac6e989)
  • Loading branch information
jmarshallnz authored and theuni committed Jan 30, 2011
1 parent 9879a46 commit bb9e12b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions xbmc/AdvancedSettings.cpp
Expand Up @@ -84,8 +84,8 @@ void CAdvancedSettings::Initialize()
m_videoPPFFmpegPostProc = "ha:128:7,va,dr";
m_videoDefaultPlayer = "dvdplayer";
m_videoDefaultDVDPlayer = "dvdplayer";
m_videoIgnoreAtStart = 15;
m_videoIgnoreAtEnd = 5;
m_videoIgnoreSecondsAtStart = 3*60;
m_videoIgnorePercentAtEnd = 8.0f;
m_videoPlayCountMinimumPercent = 90.0f;
m_videoHighQualityScaling = SOFTWARE_UPSCALING_DISABLED;
m_videoHighQualityScalingMethod = VS_SCALINGMETHOD_BICUBIC_SOFTWARE;
Expand Down Expand Up @@ -381,8 +381,8 @@ bool CAdvancedSettings::Load()
XMLUtils::GetString(pElement, "defaultdvdplayer", m_videoDefaultDVDPlayer);
XMLUtils::GetBoolean(pElement, "fullscreenonmoviestart", m_fullScreenOnMovieStart);
XMLUtils::GetFloat(pElement, "playcountminimumpercent", m_videoPlayCountMinimumPercent, 0.0f, 100.0f);
XMLUtils::GetInt(pElement, "ignoreatstart", m_videoIgnoreAtStart, 0, 900);
XMLUtils::GetInt(pElement, "ignoreatend", m_videoIgnoreAtEnd, 0, 900);
XMLUtils::GetInt(pElement, "ignoresecondsatstart", m_videoIgnoreSecondsAtStart, 0, 900);
XMLUtils::GetFloat(pElement, "ignorepercentatend", m_videoIgnorePercentAtEnd, 0, 100.0f);

XMLUtils::GetInt(pElement, "smallstepbackseconds", m_videoSmallStepBackSeconds, 1, INT_MAX);
XMLUtils::GetInt(pElement, "smallstepbacktries", m_videoSmallStepBackTries, 1, 10);
Expand Down
4 changes: 2 additions & 2 deletions xbmc/AdvancedSettings.h
Expand Up @@ -99,8 +99,8 @@ class CAdvancedSettings
int m_musicPercentSeekBackwardBig;
int m_musicResample;
int m_videoBlackBarColour;
int m_videoIgnoreAtStart;
int m_videoIgnoreAtEnd;
int m_videoIgnoreSecondsAtStart;
float m_videoIgnorePercentAtEnd;
CStdString m_audioHost;
bool m_audioApplyDrc;

Expand Down
8 changes: 4 additions & 4 deletions xbmc/Application.cpp
Expand Up @@ -4086,14 +4086,14 @@ void CApplication::UpdateFileState()
m_progressTrackingVideoResumeBookmark.playerState = m_pPlayer->GetPlayerState();
m_progressTrackingVideoResumeBookmark.thumbNailImage.Empty();

if (g_advancedSettings.m_videoIgnoreAtEnd > 0 &&
GetTotalTime() - GetTime() < g_advancedSettings.m_videoIgnoreAtEnd)
if (g_advancedSettings.m_videoIgnorePercentAtEnd > 0 &&
GetTotalTime() - GetTime() < 0.01f * g_advancedSettings.m_videoIgnorePercentAtEnd * GetTotalTime())
{
// Delete the bookmark
m_progressTrackingVideoResumeBookmark.timeInSeconds = -1.0f;
}
else
if (GetTime() > g_advancedSettings.m_videoIgnoreAtStart)
if (GetTime() > g_advancedSettings.m_videoIgnoreSecondsAtStart)
{
// Update the bookmark
m_progressTrackingVideoResumeBookmark.timeInSeconds = GetTime();
Expand Down Expand Up @@ -4504,7 +4504,7 @@ bool CApplication::OnMessage(CGUIMessage& message)

// In case playback ended due to user eg. skipping over the end, clear
// our resume bookmark here
if (message.GetMessage() == GUI_MSG_PLAYBACK_ENDED && m_progressTrackingPlayCountUpdate && g_advancedSettings.m_videoIgnoreAtEnd > 0)
if (message.GetMessage() == GUI_MSG_PLAYBACK_ENDED && m_progressTrackingPlayCountUpdate && g_advancedSettings.m_videoIgnorePercentAtEnd > 0)
{
// Delete the bookmark
m_progressTrackingVideoResumeBookmark.timeInSeconds = -1.0f;
Expand Down

0 comments on commit bb9e12b

Please sign in to comment.