|Notice that rating and labels are already synchronized.|
This was the last big milestone of my project and I'm happy to have it completed just before GSoC's suggested pencils-down date. I must say that implementing all the Last.fm stuff was easier than expected, but that's probably because of the solid foundations of the framework that have been laid earlier. :-)
|Compare with screenshots from earlier posts.|
What I've done this week:
- Restructured internal code of StatSyncing::Controller to be even cleaner with regards to maintaining synchronizable collections.
- Polished the UI of the Choose Providers dialog. It is much cleaner now and will make the KDE Usability team happy. See screenshot above.
- Changed track matching to be case-insensitive. It would be a pity not to match 2 tracks just because the other one is not properly capitalized.
- Implemented logic to synchronize labels across collections. For each track, you can tick which collections will be the sources of labels. Resulting labels are then the union of the checked ones.
- Implemented matching with Last.fm tracks of your Last.fm Library; you have to have Last.fm plugin enabled and configured for this to work. Last.fm can match tracks by their artist, album and title.
- Implemented reading of Last.fm metadata - it can provide play count and tags, and we use a trick to store rating using tags.
- Implemented updating of Last.fm metadata - it can update tags and, with our little trick, even rating. See screenshot below.
|My Last.fm tags look like this now. :-)|
Problems I've faced:
- First & last play dates sadly aren't provided by Last.fm, although they have the data. Fortunately the framework is flexible enough to gracefully cope with them missing. But I'll try to convince Last.fm staff to include them in their web API.
- liblastfm has a bug in its Track::removeTag method which breaks tag removal. I've fixed it, but the bug will hit you unless you use my liblastfm branch or until liblastfm incorporates the pull request and releases it.
- Buttons for mass-resolution of label conflicts in the Matched Tracks dialog.
- Configuration option to exclude some labels from synchronization.
- Option in the Last.fm plugin to opt-out from using the fancy rating tags.
- Better error reporting.
- Further polishing of the Matched Tracks dialog as suggested by the KDE Usability team.
- Scrobbling tracks played on iPods to Last.fm - all support code is ready, I only need to devise an algorithm for guessing scrobble times (we only have last played time and play count).