Skip to content
This repository
Browse code

Merge pull request #1835 from pieh/cancel_scan

fix: GUI freezes when cancelling update library
  • Loading branch information...
commit 880dfe9025d4f8fd66ee06d06ab47dce9127ba2b 2 parents 914e708 + 70d69ef
jmarshallnz authored November 23, 2012
2  xbmc/music/infoscanner/MusicInfoScanner.cpp
@@ -355,7 +355,7 @@ void CMusicInfoScanner::Stop()
355 355
   if (m_bCanInterrupt)
356 356
     m_musicDatabase.Interupt();
357 357
 
358  
-  StopThread();
  358
+  StopThread(false);
359 359
 }
360 360
 
361 361
 static void OnDirectoryScanned(const CStdString& strDirectory)
4  xbmc/video/VideoInfoScanner.cpp
@@ -189,7 +189,7 @@ namespace VIDEO
189 189
     if (m_bCanInterrupt)
190 190
       m_database.Interupt();
191 191
 
192  
-    StopThread();
  192
+    StopThread(false);
193 193
   }
194 194
 
195 195
   void CVideoInfoScanner::CleanDatabase(CGUIDialogProgressBarHandle* handle /*= NULL */, const set<int>* paths /*= NULL */, bool showProgress /*= true */)
@@ -1863,7 +1863,7 @@ namespace VIDEO
1863 1863
     MOVIELIST movielist;
1864 1864
     CVideoInfoDownloader imdb(scraper);
1865 1865
     int returncode = imdb.FindMovie(videoName, movielist, progress);
1866  
-    if (returncode < 0 || (returncode == 0 && !DownloadFailed(progress)))
  1866
+    if (returncode < 0 || (returncode == 0 && (m_bStop || !DownloadFailed(progress))))
1867 1867
     { // scraper reported an error, or we had an error and user wants to cancel the scan
1868 1868
       m_bStop = true;
1869 1869
       return -1; // cancelled

0 notes on commit 880dfe9

Please sign in to comment.
Something went wrong with that request. Please try again.