GNOME Bugzilla – Bug 619609
Check if a track has album before fetching cover
Last modified: 2011-03-22 14:32:56 UTC
Created attachment 161940 [details] [review] Patch to check if a track has album before fetching cover I have several tracks with 'Unknown album', usually with an empty tag for it. When I play some of these tracks, Banshee tries to find a cover and, sometimes, finds it. This behaviour was changed for the general fetcher, but it wasn't for specific fetching. I attach a patch that solves that. The lines are copied from the CoverArtJob, and perhaps MetadataService.cs is the place where they must be. Any suggestion?
Review of attachment 161940 [details] [review]: Seems fine to me overall ::: src/Core/Banshee.Services/Banshee.Metadata/MetadataService.cs @@ +88,3 @@ + if (String.IsNullOrEmpty (track.AlbumTitle) || track.AlbumTitle == Catalog.GetString ("Unknown Album") || + String.IsNullOrEmpty (track.ArtistName) || track.ArtistName == Catalog.GetString ("Unknown Artist")) { Instead of these GetString calls, you can/should use ArtistInfo.UnknownArtistName and AlbumInfo.UnknownAlbumTitle
Can you attach in in `git format-patch` format too, eg with a commit msg, etc? Thanks!
Created attachment 165632 [details] [review] Changed patch I hope I have done this patch well, I am an absolutely newbie with git :(
Pretty good, next time check the 'patch' box when attaching though. One more thing: can you make sure none of the providers work even w/ a blank/unknown artist/album? At some point I was working on a patch to the Musicbrainz one to support artist/title lookup (when album unknown), butI don't think I ever committed it.
The problem is precisely that some providers return the first cover they find. If no album is supplied, then the result is random. At least I have seen that with Rhapsody.
Comment on attachment 165632 [details] [review] Changed patch Committed, thanks!