Permalink
Browse files

fixed: bypass the scraper check and display the video info dialog in …

…case we already got metadata (fixes rare cases where the scraper was disabled and/or the content was unset)
  • Loading branch information...
1 parent f6206c3 commit b9919fedb9db830668e3e73add793ebae37242c7 @mkortstiege mkortstiege committed Sep 12, 2011
Showing with 24 additions and 14 deletions.
  1. +24 −14 xbmc/video/windows/GUIWindowVideoBase.cpp
View
38 xbmc/video/windows/GUIWindowVideoBase.cpp
@@ -957,25 +957,35 @@ bool CGUIWindowVideoBase::OnInfo(int iItem)
else
URIUtils::GetDirectory(item->GetPath(),strDir);
- SScanSettings settings;
- bool foundDirectly = false;
- scraper = m_database.GetScraperForPath(strDir, settings, foundDirectly);
-
- if (!scraper &&
- !(m_database.HasMovieInfo(item->GetPath()) ||
- m_database.HasTvShowInfo(strDir) ||
- m_database.HasEpisodeInfo(item->GetPath())))
+ CVideoInfoTag details;
+ if (m_database.LoadVideoInfo(strDir, details))
{
- return false;
+ CGUIDialogVideoInfo* pDlgInfo = (CGUIDialogVideoInfo*)g_windowManager.GetWindow(WINDOW_DIALOG_VIDEO_INFO);
+
+ if (!pDlgInfo)
+ return false;
+
+ *item->GetVideoInfoTag() = details;
+ pDlgInfo->SetMovie(item.get());
+ pDlgInfo->DoModal();
}
+ else
+ {
+ SScanSettings settings;
+ bool foundDirectly = false;
+ scraper = m_database.GetScraperForPath(strDir, settings, foundDirectly);
- if (scraper && scraper->Content() == CONTENT_TVSHOWS && foundDirectly && !settings.parent_name_root) // dont lookup on root tvshow folder
- return true;
- }
+ if (!scraper)
+ return false;
- OnInfo(item.get(), scraper);
+ if (scraper && scraper->Content() == CONTENT_TVSHOWS && foundDirectly && !settings.parent_name_root) // dont lookup on root tvshow folder
+ return true;
- return true;
+ OnInfo(item.get(), scraper);
+ return true;
+ }
+ }
+ return false;
}
void CGUIWindowVideoBase::OnRestartItem(int iItem)

0 comments on commit b9919fe

Please sign in to comment.