Amarok StatSyncing GSoC: week 7 aka Where are all my statistics? And where is Amarok 2.6?

Matěj Laitl · July 10, 2012 · 2 min read

Yes, I'm still working on my GSoC project about statistics synchronization in Amarok. Past week was a bit unusual, because I've worked mainly on fixing bugs in Amarok and not directly on statistics synchronization. I think it is justifiable, because a) the bugs are about data loss which includes statistics b) they block the 2.6 release c) my GSoC timeline allows me to do so as items for week 7 are already implemented d) the data loss bugged me for long time. :-)

What I've done this week:
  • Fixed bug 292245 where statistics, lyrics and labels of a song are lost if its meta-data are changed in Amarok and then it is moved. The fix is already pushed to master, enjoy!
  • Fixed bug 298275 where statistics of all tracks are lost in some cases such as toggling Local Files & USB Mass Storage Backend in Configuration -> Plugins (don't do it!). This turned out to be rather beefy patch series that currently awaits review (hi Ralf!) as it touches some delicate parts of Amarok.
  • Made SqlScanResultProcessor clean up the mess left by the Organize Files functionality (bug 289338), included in above series.
  • (Hopefully) made Amarok much more cautious when it comes to destructive operations in order not to lose precious data such as ratings when something goes wrong. For example, no entries are removed from the database if a serious error occurs before. Included in above series.
Problems I've faced:
  • SqlScanResultProcessor was rather hard to understand. I spend hours just to realise what's going on.
  • Debugging collection scanner is time consuming. I've performed countless code → build → restore database → test cycles.
What's next:
  • I'll file usability review request about GUI of statistics synchronization.
  • I'll move on to the second part of my project - Last.fm integration in statistics synchronization.
Fortunately, I finally succeeded and all data loss bugs I was able to reproduce are fixed now. This means that the Amarok 2.6 is closer now because both main fixed bugs were marked as release blockers. On the other hand, 2 bugs still remain and our release guy, Bart, is time-constrained currently (fortunately he documented the whole process well).

You can test my work by pulling and building gsoc branch of my Amarok git repository clone, it already works quite well! 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 week 4 (week 5 done in →) week 6 week 7 (master bugfix)