diff options
author | Pacho Ramos <pacho@gentoo.org> | 2011-07-09 14:47:46 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2011-07-09 14:47:46 +0000 |
commit | 0b4ee400eca6e6074b6bdfa8b842d98588cba4de (patch) | |
tree | 2584ec54092497a516dae6faf21c59b5ecfc2a06 /media-sound/banshee/files/banshee-2.0.1-musicbrainz-useragent.patch | |
parent | Back to ~hppa. (diff) | |
download | gentoo-2-0b4ee400eca6e6074b6bdfa8b842d98588cba4de.tar.gz gentoo-2-0b4ee400eca6e6074b6bdfa8b842d98588cba4de.tar.bz2 gentoo-2-0b4ee400eca6e6074b6bdfa8b842d98588cba4de.zip |
Add forgotten patches, bug #374519 by Marcin Sporysz and Brad Laue.
(Portage version: 2.1.10.3/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/banshee/files/banshee-2.0.1-musicbrainz-useragent.patch')
-rw-r--r-- | media-sound/banshee/files/banshee-2.0.1-musicbrainz-useragent.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/media-sound/banshee/files/banshee-2.0.1-musicbrainz-useragent.patch b/media-sound/banshee/files/banshee-2.0.1-musicbrainz-useragent.patch new file mode 100644 index 000000000000..c0a681b11888 --- /dev/null +++ b/media-sound/banshee/files/banshee-2.0.1-musicbrainz-useragent.patch @@ -0,0 +1,37 @@ +From 7e756d97b13be1301c487375a5589060a8befb76 Mon Sep 17 00:00:00 2001 +From: Gabriel Burt <gabriel.burt@gmail.com> +Date: Wed, 04 May 2011 21:03:32 +0000 +Subject: MusicBrainz: Allow specifying a UserAgent + +MB now requires a UserAgent to be set. This change will let Banshee set +one. +--- +diff --git a/src/Libraries/MusicBrainz/MusicBrainz/MusicBrainzObject.cs b/src/Libraries/MusicBrainz/MusicBrainz/MusicBrainzObject.cs +index 1a2732a..d83261e 100644 +--- a/src/Libraries/MusicBrainz/MusicBrainz/MusicBrainzObject.cs ++++ b/src/Libraries/MusicBrainz/MusicBrainz/MusicBrainzObject.cs +@@ -389,7 +389,8 @@ namespace MusicBrainz + if (min_interval > time) + Thread.Sleep ((min_interval - time).Milliseconds); + +- WebRequest request = WebRequest.Create (url); ++ var request = WebRequest.Create (url) as HttpWebRequest; ++ request.UserAgent = MusicBrainzService.UserAgent; + if (cache_implemented == null) { + try { + request.CachePolicy = MusicBrainzService.CachePolicy; +diff --git a/src/Libraries/MusicBrainz/MusicBrainz/MusicBrainzService.cs b/src/Libraries/MusicBrainz/MusicBrainz/MusicBrainzService.cs +index 5e860db..f868e2b 100644 +--- a/src/Libraries/MusicBrainz/MusicBrainz/MusicBrainzService.cs ++++ b/src/Libraries/MusicBrainz/MusicBrainz/MusicBrainzService.cs +@@ -36,6 +36,8 @@ namespace MusicBrainz + } + } + ++ public static string UserAgent { get; set; } ++ + static RequestCachePolicy cache_policy; + public static RequestCachePolicy CachePolicy { + get { return cache_policy; } +-- +cgit v0.9 |