[banshee] [LibraryWatcher] Enable only for music/video (bgo#608829)



commit 1c464b21ca5359dab3dbefc0755256b1e81fb4c0
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date:   Thu Feb 4 21:26:33 2010 +1100

    [LibraryWatcher] Enable only for music/video (bgo#608829)

 .../LibraryWatcherService.cs                       |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/LibraryWatcherService.cs b/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/LibraryWatcherService.cs
index fee1aed..6f1aef5 100644
--- a/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/LibraryWatcherService.cs
+++ b/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/LibraryWatcherService.cs
@@ -53,12 +53,19 @@ namespace Banshee.LibraryWatcher
 
         public void DelayedInitialize ()
         {
+            // FIXME: Support sources other than the music and the video library (e.g. podcasts, audiobooks, etc)
+            // The SourceWatcher uses LibraryImportManager which is specific to music/video.
+            // To support other sources we need a separate importer for each of them.
+            /*
             ServiceManager.SourceManager.SourceAdded += OnSourceAdded;
             ServiceManager.SourceManager.SourceRemoved += OnSourceRemoved;
 
             foreach (var library in ServiceManager.SourceManager.FindSources<LibrarySource> ()) {
                 AddLibrary (library);
             }
+            */
+            AddLibrary (ServiceManager.SourceManager.MusicLibrary);
+            AddLibrary (ServiceManager.SourceManager.VideoLibrary);
         }
 
         public void Dispose ()
@@ -71,6 +78,7 @@ namespace Banshee.LibraryWatcher
             }
         }
 
+        /*
         private void OnSourceAdded (SourceAddedArgs args)
         {
             var library = args.Source as LibrarySource;
@@ -86,6 +94,7 @@ namespace Banshee.LibraryWatcher
                 RemoveLibrary (library);
             }
         }
+        */
 
         private void AddLibrary (LibrarySource library)
         {
@@ -107,6 +116,7 @@ namespace Banshee.LibraryWatcher
             }
         }
 
+        /*
         private void RemoveLibrary (LibrarySource library)
         {
             lock (watchers) {
@@ -116,5 +126,6 @@ namespace Banshee.LibraryWatcher
                 }
             }
         }
+        */
     }
 }



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