Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

OnInfo is called from outside the window class, so make sure the musi…

…c database is open
  • Loading branch information...
commit ec3b6103ca16cf8ce5694e1e05d93bff3de7aa8f 1 parent 344e8de
Jonathan Marshall authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 xbmc/music/windows/GUIWindowMusicBase.cpp
View
8 xbmc/music/windows/GUIWindowMusicBase.cpp
@@ -301,6 +301,9 @@ void CGUIWindowMusicBase::OnInfo(CFileItem *pItem, bool bShowInfo)
return;
}
+ // this function called from outside this window - make sure the database is open
+ m_musicdatabase.Open();
+
CStdString strPath = pItem->GetPath();
// Try to find an album to lookup from the current item
@@ -346,7 +349,10 @@ void CGUIWindowMusicBase::OnInfo(CFileItem *pItem, bool bShowInfo)
m_dlgProgress->StartModal();
m_dlgProgress->Progress();
if (m_dlgProgress->IsCanceled())
+ {
+ m_musicdatabase.Close();
return;
+ }
}
// check the first song we find in the folder, and grab it's album info
for (int i = 0; i < items.Size() && !foundAlbum; i++)
@@ -374,6 +380,7 @@ void CGUIWindowMusicBase::OnInfo(CFileItem *pItem, bool bShowInfo)
CLog::Log(LOGINFO, "%s called on a folder containing no songs with tag info - nothing can be done", __FUNCTION__);
if (m_dlgProgress && bShowInfo)
m_dlgProgress->Close();
+ m_musicdatabase.Close();
return;
}
@@ -385,6 +392,7 @@ void CGUIWindowMusicBase::OnInfo(CFileItem *pItem, bool bShowInfo)
ShowArtistInfo(artist, pItem->GetPath(), false, bShowInfo);
else
ShowAlbumInfo(album, strPath, false, bShowInfo);
+ m_musicdatabase.Close();
}
void CGUIWindowMusicBase::OnManualAlbumInfo()
Please sign in to comment.
Something went wrong with that request. Please try again.