Re: [Banshee-List] Boston Summit - Banshee Lyrics Plugin



Patch attached to suppress error (but you still have to wait a few
seconds for your song to start).

On 10/15/06, Sanford Armstrong <sanfordarmstrong gmail com> wrote:
I think the lyrc website is just down.  I'm getting the same problem
as you, and I think it's just because I can't resolve
http://lyrc.com.ar .

Sandy

On 10/15/06, Nil Gradisnik <ghaefbgtk gmail com> wrote:
> Running Ubuntu Edgy updated, mono 1.1.7.1, banshee 0.11.0,
> banshee-lyrics-plugin-0.1.
>
> When I enable plugin and start the playback banshee pauses for a few
> seconds, I get warrning message in a window: Playback Error, The
> request timed out.
>
> And this is the --debug output:
>
> Could not fetch recommendations: Text node cannot appear in this
> state.  Line 903, position 18.
> System.Net.WebException: The request timed out
>   at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult
> asyncResult) [0x0006e] in
> /build/buildd/mono-1.1.17.1/mcs/class/System/System.Net/HttpWebRequest.cs:721
>   at System.Net.HttpWebRequest.GetResponse () [0x0000e] in
> /build/buildd/mono-1.1.17.1/mcs/class/System/System.Net/HttpWebRequest.cs:726
>   at Banshee.Plugins.Lyrics.Base.GetSource (System.String url) [0x00000]
>   at Banshee.Plugins.Lyrics.Lyrc.GetLyrics (System.String Artist,
> System.String Song) [0x00000]
>   at Banshee.Plugins.Lyrics.LyricsPane.ShowPane (System.String artist,
> System.String title) [0x00000]
>   at Banshee.Plugins.Lyrics.LyricsPlugin.ShowPane (System.String
> artist, System.String title) [0x00000]
>   at Banshee.Plugins.Lyrics.LyricsPlugin.OnPlayerEngineEventChanged
> (System.Object o, Banshee.MediaEngine.PlayerEngineEventArgs args)
> [0x00000]
>   at (wrapper delegate-invoke)
> System.MulticastDelegate:invoke_void_object_PlayerEngineEventArgs
> (object,Banshee.MediaEngine.PlayerEngineEventArgs)
>   at Banshee.Base.PlayerEngineCore.OnEngineEventChanged (System.Object
> o, Banshee.MediaEngine.PlayerEngineEventArgs args) [0x00018] in
> /build/buildd/banshee-0.11.0/src/Banshee.Base/PlayerEngineCore.cs:127
>   at (wrapper delegate-invoke)
> System.MulticastDelegate:invoke_void_object_PlayerEngineEventArgs
> (object,Banshee.MediaEngine.PlayerEngineEventArgs)
>   at Banshee.MediaEngine.PlayerEngine.RaiseEventChanged
> (PlayerEngineEvent evnt, System.String message, Double
> bufferingPercent) [0x00028] in
> /build/buildd/banshee-0.11.0/src/Banshee.Base/MediaEngine/PlayerEngine.cs:202
>   at Banshee.MediaEngine.PlayerEngine.OnEventChanged
> (PlayerEngineEvent evnt, System.String message, Double
> bufferingPercent) [0x0002c] in
> /build/buildd/banshee-0.11.0/src/Banshee.Base/MediaEngine/PlayerEngine.cs:186
>   at Banshee.MediaEngine.PlayerEngine.OnEventChanged
> (PlayerEngineEvent evnt) [0x00000] in
> /build/buildd/banshee-0.11.0/src/Banshee.Base/MediaEngine/PlayerEngine.cs:175
>   at Banshee.MediaEngine.PlayerEngine.HandleOpen (Banshee.Base.SafeUri
> uri) [0x00018] in
> /build/buildd/banshee-0.11.0/src/Banshee.Base/MediaEngine/PlayerEngine.cs:122
> Error: [10/15/2006 3:21:30 PM] (Playback Error) - The request timed out
>
>
>
> On 10/13/06, Aaron Bockover <abockover novell com> wrote:
> > Adam gave a great demo of this on Monday after his work throughout the
> > weekend at the GNOME Summit in Boston. I'd encourage everyone to give
> > this plugin a try!
> >
> > --Aaron
> >
> > On Wed, 2006-10-11 at 03:10 -0500, Adam Israel wrote:
> > > I hacked together my first Banshee plugin during the Boston Summit this
> > > past weekend.  It is a simple plugin that will fetch and display the
> > > lyrics for the currently-playing song.
> > >
> > > http://battleaxe.net/projects/banshee/plugins/lyrics/
> > >
> > > -- Adam
> > >
> > >
> > > _______________________________________________
> > > Banshee-list mailing list
> > > Banshee-list gnome org
> > > http://mail.gnome.org/mailman/listinfo/banshee-list
> >
> > _______________________________________________
> > Banshee-list mailing list
> > Banshee-list gnome org
> > http://mail.gnome.org/mailman/listinfo/banshee-list
> >
> _______________________________________________
> Banshee-list mailing list
> Banshee-list gnome org
> http://mail.gnome.org/mailman/listinfo/banshee-list
>

=== modified file 'src/Lyrics/Base.cs'
--- src/Lyrics/Base.cs	2006-10-09 18:12:09 +0000
+++ src/Lyrics/Base.cs	2006-10-15 16:46:24 +0000
@@ -34,7 +34,13 @@
 
             request.Timeout = 10000;
 
-            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+            HttpWebResponse response;
+			
+			try {
+				response = (HttpWebResponse)request.GetResponse();
+			} catch (System.Net.WebException) {
+				return source;
+			}
 
 
             if(response.ContentLength == 0) {



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