diff options
author | Jonathan Marshall <jmarshall@xbmc.org> | 2014-02-01 09:17:27 +1300 |
---|---|---|
committer | Jonathan Marshall <jmarshall@xbmc.org> | 2014-02-01 09:17:32 +1300 |
commit | 2af8e057dc2df1aeefbca924699b3d65ea178e3f (patch) | |
tree | b92edf6b246584fe17286c708b3b7e6052f7f307 | |
parent | e55212c5cb9bbe1e087b91bb35743649622f5837 (diff) |
[videoinfo] episode counts in video info dialog were wrong in most cases. fixes #14893
-rw-r--r-- | xbmc/video/dialogs/GUIDialogVideoInfo.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp index bca5a63f96..03f1aa638c 100644 --- a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp +++ b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp @@ -305,11 +305,14 @@ void CGUIDialogVideoInfo::SetMovie(const CFileItem *item) m_movieItem->m_dateTime = m_movieItem->GetVideoInfoTag()->m_premiered; if(m_movieItem->GetVideoInfoTag()->m_iYear == 0 && m_movieItem->m_dateTime.IsValid()) m_movieItem->GetVideoInfoTag()->m_iYear = m_movieItem->m_dateTime.GetYear(); - m_movieItem->SetProperty("totalepisodes", m_movieItem->GetVideoInfoTag()->m_iEpisode); - m_movieItem->SetProperty("numepisodes", m_movieItem->GetVideoInfoTag()->m_iEpisode); // info view has no concept of current watched/unwatched filter as we could come here from files view, but set for consistency - m_movieItem->SetProperty("watchedepisodes", m_movieItem->GetVideoInfoTag()->m_playCount); - m_movieItem->SetProperty("unwatchedepisodes", m_movieItem->GetVideoInfoTag()->m_iEpisode - m_movieItem->GetVideoInfoTag()->m_playCount); - m_movieItem->GetVideoInfoTag()->m_playCount = (m_movieItem->GetVideoInfoTag()->m_iEpisode == m_movieItem->GetVideoInfoTag()->m_playCount) ? 1 : 0; + if (!m_movieItem->HasProperty("totalepisodes")) + { + m_movieItem->SetProperty("totalepisodes", m_movieItem->GetVideoInfoTag()->m_iEpisode); + m_movieItem->SetProperty("numepisodes", m_movieItem->GetVideoInfoTag()->m_iEpisode); // info view has no concept of current watched/unwatched filter as we could come here from files view, but set for consistency + m_movieItem->SetProperty("watchedepisodes", m_movieItem->GetVideoInfoTag()->m_playCount); + m_movieItem->SetProperty("unwatchedepisodes", m_movieItem->GetVideoInfoTag()->m_iEpisode - m_movieItem->GetVideoInfoTag()->m_playCount); + m_movieItem->GetVideoInfoTag()->m_playCount = (m_movieItem->GetVideoInfoTag()->m_iEpisode == m_movieItem->GetVideoInfoTag()->m_playCount) ? 1 : 0; + } } else if (type == VIDEODB_CONTENT_EPISODES) { |