Amarok 2.8 Released! (+MTP (Android) GSoC: weeks 8 & 9)

Matěj Laitl · August 16, 2013 · 2 min read

the day has come. Amarok 2.8 is out! I know I've already said it about 2.7, but this is the best Amarok release. Ever. The number of improvements and bugfixes is insane. The official release announcement contains the most visible changes and the ChangeLog list them all, but let me highlight some that didn't fit into the announcement. We how (also) have:
  • Opus codec support including transcoding by Martin Brodbeck (only with development version of TagLib or 1.9 once it is released though).
  • ASX playlist support by Tatjana Gornak (used by many on-line radios).
  • Improved Nepomuk Collection that dynamically queries Nepomuk by Edward Toroshchin (still in beta state though).
  • Fixed Local Collection and Collection Browser that reflects removed files and folders immediately.
  • More keyboard shortcuts and possible UI workflows.
  • Improved and fixed plugin.
  • More control over transcoding.
  • Improved File Browser.
We've changed a couple of existing things too:
  • We've removed the splash screen, with an SSD is it just an unnecessary flicker.
  • Album Artist level have replaced Artist one in the Collection Browser by default; the Artist level no-longer duplicates tracks under Various Artists.
  • Playback start on double-clicking has been made configurable, middle-click action to play tracks immediately has been added.
Apart from releasing Amarok, I've also done some work on my GSoC project, although the amount of it has been limited by my other responsibilities. Here comes the report for my project to rewrite MTP (Android) support in Amarok from scratch. I've mainly perfected editing of track metadata.

What I've done last weeks:
  • Finished support for editing track metadata in a way that I'm satisfied with. It is a bit elaborate, but anything less would be suboptimal, see:
    1. User changes some metadata.
      • we note the set of the metadata that she actually changed.
    2. Background job to process the change is initiated.
    3. MTP commands to update the properties are sent to the device. If the user has disabled Use File Metadata, the job is finished. Else...
    4. If the track is not yet cached locally, it is downloaded to the local filesystem.
      • Because the file tags are usually more accurate than the metadata the MTP device provides us, we update the current metadata with file tags, except the ones that were changed.
    5. Tags in the local cached file are updated using TagLib.
    6. The local cached file is (re)uploaded to the device under a temporary name with a random part in it.
    7. The old on-device track object is deleted
    8. The temporary on-device file is renamed back to the original one.
Problems I've faced:
  • There doesn't seem to be a way with MTP to replace contents of an existing object. This means that the item id of a existing tracks can change, which is unpleasant, but manageable.
What's next:
  • Config dialog, and finally transferring tracks to the device! (it is in fact half-done, because the code will be shared with track editing support)
You can view and test my code by checking out gsoc branch of my personal Amarok clone repository.