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 | |
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)
4 files changed, 120 insertions, 1 deletions
diff --git a/media-sound/banshee/ChangeLog b/media-sound/banshee/ChangeLog index b5a3d9a9438d..c3a1e8f2f1ce 100644 --- a/media-sound/banshee/ChangeLog +++ b/media-sound/banshee/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-sound/banshee # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/banshee/ChangeLog,v 1.137 2011/07/08 16:41:18 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/banshee/ChangeLog,v 1.138 2011/07/09 14:47:46 pacho Exp $ + + 09 Jul 2011; Pacho Ramos <pacho@gentoo.org> + +files/banshee-2.0.1-audiocd-metadata.patch, + +files/banshee-2.0.1-musicbrainz-useragent.patch, + +files/banshee-2.0.1-musicbrainz-useragent-fixes.patch: + Add forgotten patches, bug #374519 by Marcin Sporysz and Brad Laue. *banshee-2.0.1 (08 Jul 2011) diff --git a/media-sound/banshee/files/banshee-2.0.1-audiocd-metadata.patch b/media-sound/banshee/files/banshee-2.0.1-audiocd-metadata.patch new file mode 100644 index 000000000000..b465b70a381f --- /dev/null +++ b/media-sound/banshee/files/banshee-2.0.1-audiocd-metadata.patch @@ -0,0 +1,41 @@ +From d6274af6f2a0240d16854b9c78a0175bada255ec Mon Sep 17 00:00:00 2001 +From: Bertrand Lorentz <bertrand.lorentz@gmail.com> +Date: Sat, 28 May 2011 14:21:20 +0000 +Subject: AudioCd: Fix metadata fetching with multiple results (bgo#587264) + +When looking for CD metadata on MusicBrainz, we were looking for a +perfect match: only one release with a score of 100. If the search +returned more than one result with a score of 100, we would reject all +results. +MusicBrainz recently started to return multiple releases much more +often, causing our metadata fetching to fail quite a lot. + +We now use the first result if it has a score of 100, ignoring any other +results. + +This also fixes a NRE when no results were found. +--- +diff --git a/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs b/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs +index 51a35d0..2e7a7db 100644 +--- a/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs ++++ b/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs +@@ -123,10 +123,15 @@ namespace Banshee.AudioCd + + OnMetadataQueryStarted (mb_disc); + +- Release release = Release.Query (mb_disc).PerfectMatch (); ++ Release release = Release.Query (mb_disc).First (); + ++ if (release == null || release.Score < 100) { ++ OnMetadataQueryFinished (false); ++ return; ++ } ++ + var tracks = release.GetTracks (); +- if (release == null || tracks.Count != Count) { ++ if (tracks.Count != Count) { + OnMetadataQueryFinished (false); + return; + } +-- +cgit v0.9 diff --git a/media-sound/banshee/files/banshee-2.0.1-musicbrainz-useragent-fixes.patch b/media-sound/banshee/files/banshee-2.0.1-musicbrainz-useragent-fixes.patch new file mode 100644 index 000000000000..b0a836e77f98 --- /dev/null +++ b/media-sound/banshee/files/banshee-2.0.1-musicbrainz-useragent-fixes.patch @@ -0,0 +1,35 @@ +From 727355c16234603734e33c16b713ccfffbcef972 Mon Sep 17 00:00:00 2001 +From: Gabriel Burt <gabriel.burt@gmail.com> +Date: Wed, 04 May 2011 21:05:00 +0000 +Subject: Set UserAgent when doing MusicBrainz queries (bgo#649401) + +Our Audio CD metadata lookup and coverart lookup that depend on MB were +broken without this. +--- +diff --git a/src/Core/Banshee.Services/Banshee.Metadata.MusicBrainz/MusicBrainzQueryJob.cs b/src/Core/Banshee.Services/Banshee.Metadata.MusicBrainz/MusicBrainzQueryJob.cs +index 7dc9248..490bd34 100644 +--- a/src/Core/Banshee.Services/Banshee.Metadata.MusicBrainz/MusicBrainzQueryJob.cs ++++ b/src/Core/Banshee.Services/Banshee.Metadata.MusicBrainz/MusicBrainzQueryJob.cs +@@ -83,6 +83,7 @@ namespace Banshee.Metadata.MusicBrainz + public MusicBrainzQueryJob (IBasicTrackInfo track) + { + Track = track; ++ MusicBrainzService.UserAgent = Banshee.Web.Browser.UserAgent; + } + + public override void Run () +diff --git a/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs b/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs +index 24b6972..51a35d0 100644 +--- a/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs ++++ b/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdDiscModel.cs +@@ -74,6 +74,8 @@ namespace Banshee.AudioCd + { + this.volume = volume; + disc_title = Catalog.GetString ("Audio CD"); ++ ++ MusicBrainzService.UserAgent = Banshee.Web.Browser.UserAgent; + } + + public void NotifyUpdated () +-- +cgit v0.9 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 |