[banshee: 45/61] [InternetArchive] More robustly get the licenseurl
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee: 45/61] [InternetArchive] More robustly get the licenseurl
- Date: Tue, 3 Nov 2009 06:31:37 +0000 (UTC)
commit 6e77a4e94f923619cd9719df4b5f6d84d3cfe9fa
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue Oct 13 16:27:16 2009 -0700
[InternetArchive] More robustly get the licenseurl
.../InternetArchive/Details.cs | 2 +-
.../InternetArchive/Field.cs | 1 +
.../InternetArchive/Search.cs | 1 +
.../InternetArchive/SearchResult.cs | 2 +-
4 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/Extensions/Banshee.InternetArchive/InternetArchive/Details.cs b/src/Extensions/Banshee.InternetArchive/InternetArchive/Details.cs
index 58ea6d0..5f6a7df 100644
--- a/src/Extensions/Banshee.InternetArchive/InternetArchive/Details.cs
+++ b/src/Extensions/Banshee.InternetArchive/InternetArchive/Details.cs
@@ -65,7 +65,7 @@ namespace InternetArchive
}
public string LicenseUrl {
- get { return metadata.GetJoined (Field.LicenseUrl.Id, ", "); }
+ get { return metadata.GetJoined (Field.LicenseUrl.Id, null) ?? metadata.GetJoined ("license", null); }
}
public string Language {
diff --git a/src/Extensions/Banshee.InternetArchive/InternetArchive/Field.cs b/src/Extensions/Banshee.InternetArchive/InternetArchive/Field.cs
index f40c512..b6d2e4b 100644
--- a/src/Extensions/Banshee.InternetArchive/InternetArchive/Field.cs
+++ b/src/Extensions/Banshee.InternetArchive/InternetArchive/Field.cs
@@ -68,6 +68,7 @@ namespace InternetArchive
public static Field Identifier = new Field ("identifier", Catalog.GetString ("ID"));
public static Field Language = new Field ("language", Catalog.GetString ("Language"));
public static Field LicenseUrl = new Field ("licenseurl", Catalog.GetString ("License"));
+ public static Field License = new Field ("license", Catalog.GetString ("License"));
public static Field MediaType = new Field ("mediatype", Catalog.GetString ("Media Type"));
public static Field NumReviews = new Field ("num_reviews",Catalog.GetString ("Review Count"));
public static Field Publisher = new Field ("publisher", Catalog.GetString ("Publisher"));
diff --git a/src/Extensions/Banshee.InternetArchive/InternetArchive/Search.cs b/src/Extensions/Banshee.InternetArchive/InternetArchive/Search.cs
index 3d54c45..b420893 100644
--- a/src/Extensions/Banshee.InternetArchive/InternetArchive/Search.cs
+++ b/src/Extensions/Banshee.InternetArchive/InternetArchive/Search.cs
@@ -61,6 +61,7 @@ namespace InternetArchive
Field.Identifier,
Field.Language,
Field.LicenseUrl,
+ Field.License,
Field.MediaType,
Field.NumReviews,
Field.Publisher,
diff --git a/src/Extensions/Banshee.InternetArchive/InternetArchive/SearchResult.cs b/src/Extensions/Banshee.InternetArchive/InternetArchive/SearchResult.cs
index 649f648..ac61cc1 100644
--- a/src/Extensions/Banshee.InternetArchive/InternetArchive/SearchResult.cs
+++ b/src/Extensions/Banshee.InternetArchive/InternetArchive/SearchResult.cs
@@ -64,7 +64,7 @@ namespace InternetArchive
}
public string LicenseUrl {
- get { return Get<string> (Field.LicenseUrl); }
+ get { return Get<string> (Field.LicenseUrl) ?? item.GetJoined ("license", null); }
}
public int Downloads {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]