Skip to content

Commit

Permalink
Merge pull request #15764 from enen92/resumeplugin
Browse files Browse the repository at this point in the history
DialogVideoInfo: do not reset the current listitem before play
  • Loading branch information
notspiff committed May 23, 2019
2 parents 30de1bb + 12a864b commit eb5f02f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions xbmc/video/dialogs/GUIDialogVideoInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,27 +627,24 @@ void CGUIDialogVideoInfo::Play(bool resume)
{
std::string strPath = StringUtils::Format("videodb://movies/sets/%i/?setid=%i",m_movieItem->GetVideoInfoTag()->m_iDbId,m_movieItem->GetVideoInfoTag()->m_iDbId);
Close();
CServiceBroker::GetGUI()->GetWindowManager().ActivateWindow(WINDOW_VIDEO_NAV,strPath);
CServiceBroker::GetGUI()->GetWindowManager().ActivateWindow(WINDOW_VIDEO_NAV, strPath);
return;
}

CFileItem movie(*m_movieItem->GetVideoInfoTag());
if (m_movieItem->GetVideoInfoTag()->m_strFileNameAndPath.empty())
movie.SetPath(m_movieItem->GetPath());
CGUIWindowVideoNav* pWindow = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIWindowVideoNav>(WINDOW_VIDEO_NAV);
if (pWindow)
{
// close our dialog
Close(true);
if (resume)
movie.m_lStartOffset = STARTOFFSET_RESUME;
else if (!CGUIWindowVideoBase::ShowResumeMenu(movie))
m_movieItem->m_lStartOffset = STARTOFFSET_RESUME;
else if (!CGUIWindowVideoBase::ShowResumeMenu(*m_movieItem))
{
// The Resume dialog was closed without any choice
Open();
return;
}
pWindow->PlayMovie(&movie);
pWindow->PlayMovie(m_movieItem.get());
}
}

Expand Down

0 comments on commit eb5f02f

Please sign in to comment.