Amarok StatSyncing GSoC: week 3

Matěj Laitl · June 11, 2012 · 1 min read

Hi, in case you forgot, I'm working on my GSoC project about statictics synchronization in Amarok. Previous report was rather early, this one is a bit late. The main success this week is that the synchronization actually works (best tested with iPods), hooray!

Progress on the Synchronize Statistics dialogue. You can see conflict resolution, updated fields would be in bold, but the are none.

What I've done this week:
  • Implemented ability to compute synchronized value for each field, this is shown in UI. Fields that are going to be updated are in bold.
  • Improve the UI to be able to sort, filter-as-you type and filter based on synchronization status (updated, not touched, having conflict).
  • Made the synchronization smart so that it for example doesn't want to update labels of an iPod track, which doesn't support labels at all.
  • Changed core Amarok classes so that first, last played time and play count can be written back to tracks.
  • Implemented actual synchronization worker on top of all this. The worker runs in a thread and is abort-able.
Problems I've faced:
  • There is currently no way to determine what statistics fields are supported by given Amarok collection. I had to use some heuristics as a temporary solution.
  • Setting some track fields is inconsistent in core Amarok classes. For example setRating() and setScore() are in Meta::Track while I really think they should be in a specialized class called EditCapability.
  • No other collection than the main one supports track labels currently (AFAIK), so I cannot really test this feature.
What's next:
  • I've already done much of the agenda for the next week, so:
  • I'll work on polishing the synchronization UI and behaviour a bit more to remove some corner-cases that currently exist.
  • I'll improve handling of rating conflicts: I plan the "Take ratings from..." button to mass-resolve unresolved rating conflicts.
You can test my work by pulling and building gsoc branch of my Amarok git repository clone, it already works! I also publish weekly diffs with more technical details on KDE's review board which may be a more convenient way to review my code and to comment on it: week 1 week 2 week 3