[banshee] PodcastService: Update podcast storage location immediately (bgo#658509)



commit 5e9b46dd0afdafea47db1554206a782427348968
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sun Sep 11 14:20:33 2011 +0200

    PodcastService: Update podcast storage location immediately (bgo#658509)
    
    The FeedsManager holds the podcast storage directory, but the value was
    only initialized on startup and never updated. We now make sure it's
    updated when the podcast library location preference is changed.

 .../Banshee.Podcasting/PodcastService.cs           |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
index 044dfae..3ccfe21 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
@@ -51,6 +51,7 @@ using Banshee.Podcasting.Gui;
 using Banshee.Podcasting.Data;
 using Banshee.Collection.Database;
 using Banshee.Configuration;
+using Banshee.Preferences;
 
 namespace Banshee.Podcasting
 {
@@ -238,6 +239,11 @@ namespace Banshee.Podcasting
 
             InitializeInterface ();
 
+            var preference = source.PreferencesPage["library-location"]["library-location"] as SchemaPreference<string>;
+            preference.ValueChanged += delegate (Root obj) {
+                feeds_manager.PodcastStorageDirectory = preference.Value;
+            };
+
             ThreadAssist.SpawnFromMain (delegate {
                 feeds_manager.PodcastStorageDirectory = source.BaseDirectory;
                 feeds_manager.FeedManager.ItemAdded += OnItemAdded;



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