A self-hosted browser-based media player for a personal MP3 collection.
-
Ultra-lightweight (search backend written in C++ with a SQLite database) so it can be hosted even on a low-power NAS box
-
Supports cover art in
cover.jpg
,albumart.jpg
orfolder.jpg
files -
Responsive design for mobile use
-
Keyboard shortcuts
-
Works with music formats supported by your browser, including MP3 and M4A (no transcoding)
To compile Quasar, you must have Inkscape, ImageMagick, wget
, and
Handlebars installed. These programs are used to render the logo,
download JavaScript libraries, and compile the templates file. To
create or update the database, you need Perl with the
Image::ExifTool
and DBD::SQLite
modules. These steps are
platform-independent and can be done on any computer, so you don't
need to install Inkscape or Handlebars on your NAS device.
You need SQLite and a C++ compiler (g++
) to compile the search backend.
-
Use
make
to download library dependencies, compile the backend, and generate static files.This requires Inkscape, ImageMagick,
wget
, and Handlebars. It is recommended to havepngcrush
as well, but that is optional. -
Update the library database by running
updatedb_sql.pl
with two arguments. The first argument is the path to the database file to create or update; the second is the Music directory to index.perl updatedb_sql.pl quasar.db /media/music
-
The Quasar daemon supports either CGI or FastCGI. The environment variable
QUASAR_DBFILE
specifies the path to the database file; if it is not set, Quasar will usequasar.db
in the current directory. -
Configure Quasar by creating the file
quasar.config.js
. An example configuration file is provided inquasar.config-example.js
. TheQUASAR
variable gives the URL to the search backend. TheMUSICDIR
variable specifies the URL to the Music directory.The
BRANDING
andLONG_BRANDING
variables allow the visible name of Quasar to be customized for your installation.
You can test Quasar locally using the basic Python web server.
Assuming QUASAR = '/cgi-bin/quasar'
in your quasar.config.js
:
mkdir -p cgi-bin
ln -s ../quasar cgi-bin
python -m CGIHTTPServer
Then open http://localhost:8000/quasar.html
.
Key | Action |
---|---|
Space or X | Toggle playback |
C or Shift+→ | Next |
Z or Shift+← | Previous |
digits 0 - 9 | Seek to position |
[ and ] | Seek 30 seconds back and forward, respectively |
; and ' | Seek 10 seconds back and forward, respectively |
, and . | Seek 5 seconds back and forward, respectively |
/ | Search |
Shift + A | Go to current artist |
Shift + B | Go to browse tab |
Shift + D | Go to current album |
Shift + N | Go to Now Playing |