[banshee] [LibraryWatcher] run RescanPipeline over libraries



commit 7db1bed7667263a08fc4e7c0ae1bc0924dbafad1
Author: Aaron Bockover <abockover novell com>
Date:   Tue Apr 27 13:32:40 2010 -0400

    [LibraryWatcher] run RescanPipeline over libraries
    
    If either the music or video library is empty, then initiate an initial
    rescan of the library folders on disk.

 .../LibraryWatcherService.cs                       |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/LibraryWatcherService.cs b/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/LibraryWatcherService.cs
index 6f1aef5..05a5d2d 100644
--- a/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/LibraryWatcherService.cs
+++ b/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/LibraryWatcherService.cs
@@ -66,6 +66,14 @@ namespace Banshee.LibraryWatcher
             */
             AddLibrary (ServiceManager.SourceManager.MusicLibrary);
             AddLibrary (ServiceManager.SourceManager.VideoLibrary);
+
+            if (ServiceManager.SourceManager.MusicLibrary.Count == 0) {
+                new Banshee.Collection.RescanPipeline (ServiceManager.SourceManager.MusicLibrary);
+            }
+
+            if (ServiceManager.SourceManager.VideoLibrary.Count == 0) {
+                new Banshee.Collection.RescanPipeline (ServiceManager.SourceManager.VideoLibrary);
+            }
         }
 
         public void Dispose ()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]