diff --git a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp index b53d0e3a6d8af..986c52b4f4d2a 100644 --- a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp +++ b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp @@ -210,16 +210,7 @@ void CGUIDialogVideoInfo::OnInitWindow() m_hasUpdatedThumb = false; m_bViewReview = true; - CVideoDatabase database; - ADDON::ScraperPtr scraper; - - if(database.Open()) - { - scraper = database.GetScraperForPath(m_movieItem->GetVideoInfoTag()->GetPath()); - database.Close(); - } - - CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_REFRESH, (CProfilesManager::Get().GetCurrentProfile().canWriteDatabases() || g_passwordManager.bMasterUser) && !StringUtils::StartsWithNoCase(m_movieItem->GetVideoInfoTag()->m_strIMDBNumber, "xx") && scraper); + CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_REFRESH, (CProfilesManager::Get().GetCurrentProfile().canWriteDatabases() || g_passwordManager.bMasterUser) && !StringUtils::StartsWithNoCase(m_movieItem->GetVideoInfoTag()->m_strIMDBNumber, "xx")); CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_GET_THUMB, (CProfilesManager::Get().GetCurrentProfile().canWriteDatabases() || g_passwordManager.bMasterUser) && !StringUtils::StartsWithNoCase(m_movieItem->GetVideoInfoTag()->m_strIMDBNumber.c_str() + 2, "plugin")); VIDEODB_CONTENT_TYPE type = (VIDEODB_CONTENT_TYPE)m_movieItem->GetVideoContentType(); diff --git a/xbmc/video/windows/GUIWindowVideoNav.cpp b/xbmc/video/windows/GUIWindowVideoNav.cpp index 84f39e62fdbe8..bf60f81d63a00 100644 --- a/xbmc/video/windows/GUIWindowVideoNav.cpp +++ b/xbmc/video/windows/GUIWindowVideoNav.cpp @@ -689,16 +689,19 @@ void CGUIWindowVideoNav::PlayItem(int iItem) void CGUIWindowVideoNav::OnInfo(CFileItem* pItem, ADDON::ScraperPtr& scraper) { - m_database.Open(); // since we can be called from the music library without being inited - if (pItem->IsVideoDb()) - scraper = m_database.GetScraperForPath(pItem->GetVideoInfoTag()->m_strPath); - else + if (!scraper || scraper->Content() == CONTENT_NONE) { - std::string strPath,strFile; - URIUtils::Split(pItem->GetPath(),strPath,strFile); - scraper = m_database.GetScraperForPath(strPath); + m_database.Open(); // since we can be called from the music library without being inited + if (pItem->IsVideoDb()) + scraper = m_database.GetScraperForPath(pItem->GetVideoInfoTag()->m_strPath); + else + { + std::string strPath,strFile; + URIUtils::Split(pItem->GetPath(),strPath,strFile); + scraper = m_database.GetScraperForPath(strPath); + } + m_database.Close(); } - m_database.Close(); CGUIWindowVideoBase::OnInfo(pItem,scraper); }