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 619609 - Check if a track has album before fetching cover
Check if a track has album before fetching cover
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: User Interface
git master
Other Linux
: Normal normal
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-25 12:51 UTC by Benjamín Valero Espinosa
Modified: 2011-03-22 14:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to check if a track has album before fetching cover (1.06 KB, patch)
2010-05-25 12:51 UTC, Benjamín Valero Espinosa
needs-work Details | Review
Changed patch (1.25 KB, patch)
2010-07-10 15:25 UTC, Benjamín Valero Espinosa
committed Details | Review

Description Benjamín Valero Espinosa 2010-05-25 12:51:05 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?
Comment 1 Gabriel Burt 2010-07-09 19:47:06 UTC
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
Comment 2 Gabriel Burt 2010-07-09 19:47:44 UTC
Can you attach in in `git format-patch` format too, eg with a commit msg, etc?  Thanks!
Comment 3 Benjamín Valero Espinosa 2010-07-10 15:25:02 UTC
Created attachment 165632 [details] [review]
Changed patch

I hope I have done this patch well, I am an absolutely newbie with git :(
Comment 4 Gabriel Burt 2010-07-13 18:13:04 UTC
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.
Comment 5 Benjamín Valero Espinosa 2010-07-13 18:22:52 UTC
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 6 Gabriel Burt 2011-03-22 14:32:49 UTC
Comment on attachment 165632 [details] [review]
Changed patch

Committed, thanks!