[banshee/stable-2.0] AmazonMp3.Store: Get the redirect URL from conf



commit 271f58ccb1235f94ab70b9cf39fcd93adaa18ed1
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Fri Apr 15 19:22:53 2011 -0500

    AmazonMp3.Store: Get the redirect URL from conf

 .../StoreSourcePreferences.cs                      |    7 +++++++
 .../Banshee.AmazonMp3.Store/StoreView.cs           |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreSourcePreferences.cs b/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreSourcePreferences.cs
index 2d04b42..3882ab2 100644
--- a/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreSourcePreferences.cs
+++ b/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreSourcePreferences.cs
@@ -64,6 +64,8 @@ namespace Banshee.AmazonMp3.Store
                 Catalog.GetString ("_Keep me logged in"),
                 Catalog.GetString ("Keep any session cookies that Amazon MP3 may set across instances.")));
             session_section.Add (logout_pref = new VoidPreference ("log-out-button"));*/
+
+            Hyena.Log.InformationFormat ("AmazonMP3 store redirect URL: {0}", RedirectUrl.Get ());
         }
 
         public void Dispose ()
@@ -119,6 +121,11 @@ namespace Banshee.AmazonMp3.Store
             "plugins.amazonmp3store", "persist-login",
             true,
             "Persist the Amazon MP3 store account login across sessions (via cookies)", null);
+
+        public static readonly SchemaEntry<string> RedirectUrl = new SchemaEntry<string> (
+            "plugins.amazonmp3store", "redirect_url",
+            StoreView.REDIRECT_URL,
+            "The URL of the redirect server to use for the AmazonMP3 store.", null);
     }
 }
 
diff --git a/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreView.cs b/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreView.cs
index 21d45fd..d2ee92c 100644
--- a/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreView.cs
+++ b/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreView.cs
@@ -194,7 +194,7 @@ namespace Banshee.AmazonMp3.Store
 
         public string GetActionUrl (string action)
         {
-            return String.Concat (REDIRECT_URL, Country, "/", action);
+            return String.Concat (StoreSourcePreferences.RedirectUrl.Get (), Country, "/", action);
         }
     }
 }



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