After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 547177 - Recommended artist not showing for some artists
Recommended artist not showing for some artists
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Last.fm
git master
Other All
: Normal normal
: 1.x
Assigned To: Gabriel Burt
Depends on:
Blocks:
 
 
Reported: 2008-08-10 14:54 UTC by Félix Velasco
Modified: 2008-08-12 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Only download non empty URL's (639 bytes, patch)
2008-08-10 14:56 UTC, Félix Velasco
committed Details | Review

Description Félix Velasco 2008-08-10 14:54:56 UTC
Please describe the problem:
When playing music from some artists, no "recommended artists" pane shows

Steps to reproduce:
1 Play any track by Eminem
2 Wait

Actual results:
No pane appears, and this exception shows in console
[Warn  16:48:46.031] Caught an exception - Invalid URI format (in `System')
  at System.Uri.Parse (UriKind kind, System.String uriString) [0x00000] 
  at System.Uri.ParseUri (UriKind kind) [0x00000] 
  at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000] 
  at System.Uri..ctor (System.String uriString) [0x00000] 
  at System.Net.WebRequest.Create (System.String requestUriString) [0x00000] 
  at Lastfm.Data.DataCore.DownloadContent (System.String data_url, System.String cache_file, CacheDuration cache_duration) [0x00043] in /home/felix/codigo/banshee/src/Libraries/Lastfm/Lastfm.Data/DataCore.cs:94 
  at Lastfm.Data.DataCore.DownloadContent (System.String data_url, CacheDuration cache_duration) [0x00000] in /home/felix/codigo/banshee/src/Libraries/Lastfm/Lastfm.Data/DataCore.cs:75 
  at Lastfm.Data.DataCore.DownloadContent (System.String data_url) [0x00000] in /home/felix/codigo/banshee/src/Libraries/Lastfm/Lastfm.Data/DataCore.cs:70 
  at Banshee.Lastfm.Recommendations.RecommendationPane.UpdateForArtist (System.String artist) [0x0001f] in /home/felix/codigo/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Recommendations/RecommendationPane.cs:243 


Expected results:
The recommended artists pane should appear.

Does this happen every time?
Yes

Other information:
The similar artists xml returned by last.fm (http://ws.audioscrobbler.com/1.0/artist/Eminem/similar.xml) contains some empty image tags (i.e.: Bizarre & Kuniva Of D12), but we try to download the empty url, and don't recover from the exception.
I'm attaching a patch that seems to solve it.
Comment 1 Félix Velasco 2008-08-10 14:56:23 UTC
Created attachment 116291 [details] [review]
Only download non empty URL's
Comment 2 Bertrand Lorentz 2008-08-11 18:40:19 UTC
I was able to reproduce the bug only once, for some reason.
The patch seems to fix it and is rather risk free.
Comment 3 Gabriel Burt 2008-08-12 17:42:03 UTC
Committed, thanks!