Skip to content

Commit

Permalink
Merge pull request xbmc#1835 from pieh/cancel_scan
Browse files Browse the repository at this point in the history
fix: GUI freezes when cancelling update library
  • Loading branch information
jmarshallnz committed Nov 23, 2012
2 parents 914e708 + 70d69ef commit 880dfe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xbmc/music/infoscanner/MusicInfoScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void CMusicInfoScanner::Stop()
if (m_bCanInterrupt)
m_musicDatabase.Interupt();

StopThread();
StopThread(false);
}

static void OnDirectoryScanned(const CStdString& strDirectory)
Expand Down
4 changes: 2 additions & 2 deletions xbmc/video/VideoInfoScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ namespace VIDEO
if (m_bCanInterrupt)
m_database.Interupt();

StopThread();
StopThread(false);
}

void CVideoInfoScanner::CleanDatabase(CGUIDialogProgressBarHandle* handle /*= NULL */, const set<int>* paths /*= NULL */, bool showProgress /*= true */)
Expand Down Expand Up @@ -1863,7 +1863,7 @@ namespace VIDEO
MOVIELIST movielist;
CVideoInfoDownloader imdb(scraper);
int returncode = imdb.FindMovie(videoName, movielist, progress);
if (returncode < 0 || (returncode == 0 && !DownloadFailed(progress)))
if (returncode < 0 || (returncode == 0 && (m_bStop || !DownloadFailed(progress))))
{ // scraper reported an error, or we had an error and user wants to cancel the scan
m_bStop = true;
return -1; // cancelled
Expand Down

0 comments on commit 880dfe9

Please sign in to comment.