Bug 286215 - Fails to scrobble to last.fm when track has no composer and "scrobble composer" setting is on
Summary: Fails to scrobble to last.fm when track has no composer and "scrobble compose...
Alias: None
Product: amarok
Classification: Applications
Component: Services/Last.fm (show other bugs)
Version: 2.4.3
Platform: Unlisted Binaries Linux
: NOR minor
Target Milestone: 2.6
Assignee: Amarok Developers
Depends on:
Reported: 2011-11-09 20:16 UTC by Илья Казначеев
Modified: 2011-11-28 02:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.5

This patch fixes the issue and also refactors a bit (4.44 KB, patch)
2011-11-27 16:21 UTC, Илья Казначеев

Note You need to log in before you can comment on or make changes to this bug.
Description Илья Казначеев 2011-11-09 20:16:33 UTC
Version:           2.4.3 (using KDE 4.6.5) 
OS:                Linux

When the new setting "Use composer instead of performer for scrobbling" is on, amaroK should still scrobble performer when composer tag is empty or absent.

But that doesn't happen, amarok happily scrobbles empty composer, liblastfm turns it into [unknown] and last.fm dropps the scrobble on the floor.

Annoying bug - if you checked the option accidentally, scrobbling would be silently not working and troubleshooting isn't easy.

Reproducible: Always

Steps to Reproduce:
Turn on the checkbox.
Listen to some track.

Actual Results:  
last.fm wouldn't show that you listen to anything
The post body would be like

Expected Results:  
it scrobbles.
Comment 1 Myriam Schweingruber 2011-11-09 23:08:35 UTC
This is really a corner case. I listen to classical music a lot, but don't use the composer scrobbling, as it usually doesn't give coherent results in last.fm, their datsbase is not really made for classical music.
Comment 2 Илья Казначеев 2011-11-10 07:15:36 UTC
The problem is clicking the option accidentallly. You'll spend a week never knowing what hit you.
Comment 3 Илья Казначеев 2011-11-27 16:21:38 UTC
Created attachment 66122 [details]
This patch fixes the issue and also refactors a bit

This patch fixes the issue by checking whether the composer is empty and falling back to performer.
I've also refactored out repetitive track-populating code into a method.
Comment 4 Myriam Schweingruber 2011-11-27 21:39:40 UTC
Thank you for the patch. Please submit it for review to http://reviewboard.kde.org. You will need to get an identity from http://identity.kde.org first.
Comment 5 Илья Казначеев 2011-11-27 22:26:36 UTC
Comment 6 Sam Lade 2011-11-28 02:43:12 UTC
Git commit f9feaf51acfca9eb9994123ffb1929c65d99aa23 by Sam Lade.
Committed on 28/11/2011 at 03:40.
Pushed by lade into branch 'master'.

Fix last.fm scrobble composer fallback to artist

Now correctly scrobbles with the artist name if the composer field is empty and
the scrobble composer option is enabled, rather than silently failing.

Patch by Ilya Kasnacheev.


M  +1    -0    ChangeLog
M  +27   -25   src/services/lastfm/ScrobblerAdapter.cpp
M  +2    -1    src/services/lastfm/ScrobblerAdapter.h