Skip to content

Commit

Permalink
fix ListItem.IsResumable and ListItem.PercentPlayed that wasn't updat…
Browse files Browse the repository at this point in the history
…ed adjusted after finishing partially watched video
  • Loading branch information
pieh committed Jun 20, 2012
1 parent ac77611 commit 4d2e226
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbmc/GUIInfoManager.cpp
Expand Up @@ -3812,7 +3812,7 @@ bool CGUIInfoManager::GetItemInt(int &value, const CGUIListItem *item, int info)
switch (info)
{
case LISTITEM_PERCENT_PLAYED:
if (item->IsFileItem() && ((const CFileItem *)item)->HasVideoInfoTag() && ((const CFileItem *)item)->GetVideoInfoTag()->m_resumePoint.totalTimeInSeconds > 0)
if (item->IsFileItem() && ((const CFileItem *)item)->HasVideoInfoTag() && ((const CFileItem *)item)->GetVideoInfoTag()->m_resumePoint.totalTimeInSeconds > 0 && ((const CFileItem *)item)->GetVideoInfoTag()->m_resumePoint.timeInSeconds > 0)
value = (int)(100 * ((const CFileItem *)item)->GetVideoInfoTag()->m_resumePoint.timeInSeconds / ((const CFileItem *)item)->GetVideoInfoTag()->m_resumePoint.totalTimeInSeconds);
else
value = 0;
Expand Down Expand Up @@ -4299,7 +4299,7 @@ bool CGUIInfoManager::GetItemBool(const CGUIListItem *item, int condition) const
else if (condition == LISTITEM_IS_FOLDER)
return item->m_bIsFolder;
else if (condition == LISTITEM_IS_RESUMABLE)
return (item->IsFileItem() && ((const CFileItem *)item)->HasVideoInfoTag() && ((const CFileItem *)item)->GetVideoInfoTag()->m_resumePoint.totalTimeInSeconds > 0);
return (item->IsFileItem() && ((const CFileItem *)item)->HasVideoInfoTag() && ((const CFileItem *)item)->GetVideoInfoTag()->m_resumePoint.timeInSeconds > 0);
return false;
}

Expand Down

0 comments on commit 4d2e226

Please sign in to comment.