Clementine Adore Mod
 All Classes Namespaces Files Functions Variables Macros Pages
Adore Developer Documentation Start Page

Introduction

In the IMP project specification it was planned to implement an audio fingerprinting algorithm into a popular music player to allow for a unbribable music identification independently from possibly stored metadata. The fingerprints had to be submitted to the backend server without any user interaction being necessary.

From all music players we tested as candidates for implementing the Adore prototype, Clementine stood out with respect to OS coverage, stability, feature richness, code maintain- and exdendability, and of course a cool user interface.

Installation

To provide an easier way to get to a debugging environment, two alternatives exist:

Shellscript

The script is suitable to install everything necessary from scratch on a freshly installed Ubuntu.

wget http://files.c3s.cc/setup_qt_and_clementine.sh
chmod 700 setup_qt_and_clementine.sh
./setup_qt_and_clementine.sh

In case of a not quite so virgin system it is recommended to first take a look on the script and make changes if necessary.

VirtualBox Image

The tarball (3,5 GB) includes a VM with the directory name Lubuntu32 (unzipped nearly 10GB):

cd "~/VirtualBox VMs"
wget http://files.c3s.cc/Lubuntu32.tgz
tar -xzf Lubuntu32.tgz
rm Lubuntu32.tgz vitualbox

Debugging Settings of the Clementine Mods

To allow access to arbitrary test installations of the REST API, it is possible to override the hard-coded url https://restapitest.c3s.cc:443 in the Clementine.conf (subdirectory ~/.config/Clementine) using the keys host and port:

[Adore]
host=http://localhost
port=6543
token=40a1b0d8-1f10-4490-b4b2-04743c61d3ea

System Requirements

For optimal performance a main memory of at least 4GB is recommended. On multi-core systems provide make with the parameter -jX (where X is the number of processor cores). Find the make settings on the Projects section of QtCreator's navi bar.

The Adore Code

You will find everything essential in the src/internet/adore folder. Namely the classes AdoreService, AdoreDb, AdoreStreamer, and AdoreSettingsPage. The EchoPrint code generator was put in the src/echoprint folder. Other than this, only minor changes have been made to other files:

In order to take off quickly and get into the framework Clementine provides for internet services, we cannibalized the lastfm code, so don't be surprised if you stumble upon remains of the lastfm scrobbler service. In the future, when the demands are more clear, we might implement an own base class for seamless user interface integration from it.

To start exploring the source code, we recommend to first take a peek in AdoreService.

See Also
AdoreService
AdoreDb
AdoreStreamer
AdoreSettingsPage