[banshee] Use new proxy URIs supporting geo-IP redirection
- From: Aaron Bockover <abock src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] Use new proxy URIs supporting geo-IP redirection
- Date: Fri, 16 Jul 2010 17:02:47 +0000 (UTC)
commit 8ffc081adb506123e136c0116ddc1efcef68a47c
Author: Aaron Bockover <abockover novell com>
Date: Fri Jul 16 12:50:07 2010 -0400
Use new proxy URIs supporting geo-IP redirection
If your IP address is detected to be in a country with an Amazon MP3
store (US, UK, DE, FR, JP), you will be redirected there. Later I will
add a UI preference for this in Banshee to override the geo-IP
redirection.
.../Banshee.AmazonMp3.Store/StoreView.cs | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
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 06a508e..e0105a2 100644
--- a/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreView.cs
+++ b/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreView.cs
@@ -46,6 +46,12 @@ namespace Banshee.AmazonMp3.Store
public bool IsSignedIn { get; private set; }
+ private string country;
+ public string Country {
+ get { return country ?? "geo"; }
+ set { country = value; }
+ }
+
public StoreView ()
{
CanSearch = true;
@@ -113,12 +119,12 @@ namespace Banshee.AmazonMp3.Store
public override void GoHome ()
{
- LoadUri ("http://integrated-services.banshee.fm/amz/do/home/");
+ LoadUri ("http://integrated-services.banshee.fm/amz/redirect.do/" + Country + "/home/");
}
public override void GoSearch (string query)
{
- LoadUri (new Uri ("http://integrated-services.banshee.fm/amz/do/search/" + query).AbsoluteUri);
+ LoadUri (new Uri ("http://integrated-services.banshee.fm/amz/redirect.do/" + Country + "/search/" + query).AbsoluteUri);
}
public void SignOut ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]