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...
Status: RESOLVED FIXED
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
URL:
Keywords:
Depends on:
Blocks:
 
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


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

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
s=xxxxx&a=%5Bunknown%5D&t=%D0%A1%D0%BE%D0%B1%D0%B0%D1%87%D0%B8%D0%B9%20%D0%B0%D0%BD%D0%B3%D0%B5%D0%BB&b=%D0%A1%D1%82%D1%80%D0%B0%D0%B6%D0%B8%20%D0%BF%D0%BE%D1%81%D0%BB%D0%B5%D0%B4%D0%BD%D0%B5%D0%B3%D0%BE%20%D1%80%D1%83%D0%B1%D0%B5%D0%B6%D0%B0&l=159&n=0&m=

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
https://git.reviewboard.kde.org/r/103279/
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.

BUG:286215
FIXED-IN:2.5
REVIEW:103279

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

http://commits.kde.org/amarok/f9feaf51acfca9eb9994123ffb1929c65d99aa23