Skip to content

Commit

Permalink
[resume] CVideoDatabase::GetPlayCounts no longer overrides informatio…
Browse files Browse the repository at this point in the history
…n set in the items, which we assume may be more up to date.
  • Loading branch information
hippojay authored and Jonathan Marshall committed Aug 3, 2012
1 parent 13c0875 commit 10509a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xbmc/video/VideoDatabase.cpp
Expand Up @@ -4130,9 +4130,12 @@ bool CVideoDatabase::GetPlayCounts(const CStdString &strPath, CFileItemList &ite
if (item)
{
item->GetVideoInfoTag()->m_playCount = m_pDS->fv(1).get_asInt();
item->GetVideoInfoTag()->m_resumePoint.timeInSeconds = m_pDS->fv(2).get_asInt();
item->GetVideoInfoTag()->m_resumePoint.totalTimeInSeconds = m_pDS->fv(3).get_asInt();
item->GetVideoInfoTag()->m_resumePoint.type = CBookmark::RESUME;
if (!item->GetVideoInfoTag()->m_resumePoint.IsSet())
{
item->GetVideoInfoTag()->m_resumePoint.timeInSeconds = m_pDS->fv(2).get_asInt();
item->GetVideoInfoTag()->m_resumePoint.totalTimeInSeconds = m_pDS->fv(3).get_asInt();
item->GetVideoInfoTag()->m_resumePoint.type = CBookmark::RESUME;
}
}
m_pDS->next();
}
Expand Down
1 change: 1 addition & 0 deletions xbmc/video/VideoDatabase.h
Expand Up @@ -402,6 +402,7 @@ class CVideoDatabase : public CDatabase
void UpdateLastPlayed(const CFileItem &item);

/*! \brief Get the playcount and resume point of a list of items
Note that if the resume point is already set on an item, it won't be overridden.
\param path the path to fetch videos from
\param items CFileItemList to fetch the playcounts for
\sa GetPlayCount, SetPlayCount, IncrementPlayCount
Expand Down

0 comments on commit 10509a3

Please sign in to comment.