fat84 / musicdb-1

🎧 A music manager with focus on remote access to your music by having a WebUI and providing an audio stream.

Home Page:https://rstemmer.github.io/musicdb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MusicDB Logo

MusicDB

MusicDB is a music manager with focus on remote access to your music using a WebUI an audio stream. The WebUI is more a presentation of your music than a database frontend.

So, when you are listening to music, you do not work with software. Instead you explore your music collection.

For more details, a list of features and screenshots see the start page rstemmer.github.io/musicdb/.


Until now I spent over 6 years for developing this awesome software. Since I finished a first test version, I use it nearly every day. Time to share it with the world. πŸ˜ƒ

For news, follow @MusicDBProject on Twitter.

A detailed description of MusicDB and its components can be found in the documentation: Overview of MusicDB

Breaking News

This section contains some important information on how to update to a next major version. Major releases have changes that are not compatible to the previous version of MusicDB. Furthermore those changes may break scripts you wrote around MusicDB.

Lines starting with "πŸ”§ Change:" are steps you have to do before updating via install.sh script.

28.07.18: 3.x.x β†’ 4.0.0+

  • Rebuild of the installation process.
    • πŸ”§ Change: Make a backup of the MusicDB data directory!
    • Do not use the update script to update to this version (4.0.0). Use the install.sh script!
  • More stable CSV files by adding a header. Now updating the old CSV files is possible
    • πŸ”§ Change: Remove the old CSV-Files from the mdbstate directory. (You'll loose the current song queue and blacklist state)
  • WebSocket configuration for WebUI is now in separate webui/config.js
    • πŸ”§ Change: You may want to backup the settings from webui/js/musicdb.js
  • The server now only accepts request from clients with a valid API Key
  • Databases now have a version number to allow easy updated.
    • πŸ”§ Change: This is the last time you have to touch the databases by yourself. For each database:
      • sqlite $DATABASE.db (With DATABASE = music, lycra, tracker)
      • CREATE TABLE IF NOT EXISTS meta (id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, VALUE TEXT DEFAULT '');
      • INSERT INTO meta (key, value) VALUES ("version", 2);
      • .quit
  • πŸ”§ Change: Restore your configuration
    • Update the icecast passwort (musicdb.ini ↔ icecast/config.xml)
    • Update the WebSocket API Key (musicdb.ini ↔ ../server/webui/config.js)

06.05.18: 2.x.x β†’ 3.0.0+

  • Two new columns added to the database: checksum and lastplayed
    • πŸ”§ Change: After installing via install.sh execute πŸ““ repair with --checksums option (musicdb repair --checksums) to fill the new added checksum column.
    • The date a song was last played is currently shown in the tooltip when hovering the cursor above a song in the Album-View.
  • I replaced the MPD backend with an own Icecast Source Client
    • Transcoding is done by GStreamer
    • πŸ”§ Change: New dependencies: gstreamer, gst-python and the good+bad GStreamer plugins
    • πŸ”§ Change: The install script creates a new directory in the MusicDB data directory called icecast. Make sure that such a directory does not exist before running install.sh. If it does, rename it, and merge your setup after the installation.
    • πŸ”§ Change: The [mpd] section can be removed from the MusicDB Configuration
  • MusicDB's state now gets stored with the blacklists and song queue in an extra directory.
    • The directory can be configured: [server] -> statedir
  • πŸ”§ Change: New musicdb.ini file will be installed as musicdb.ini.new - check the differences.

πŸ”§ Update:

# Backup the MusicDB Data directory!

# Download latest version of MusicDB
git checkout master
git pull

# Install latest version of MusicDB
sudo pacman -S gst-plugins-good gst-python gst-plugins-bad
sudo ./install.sh

# Read the linked documentation of the repair module

# Update old data
newgrp musicdb
musicdb repair --checksums

05.01.18: 1.x.x β†’ 2.0.0+

  • Signals got replaced by a named pipe

    • New configuration: [server] -> fifofile=DATADIR/musicdb.fifo
    • Communication with the server via signals (SIGTERM, SIGUSR1) is deprecated. Use the named pipe instead. (Commands: "shutdown", "refresh")
    • πŸ““ Details and examples
    • πŸ”§ Change: Add the new configuration ([server] -> fifofile=DATADIR/musicdb.fifo) into your ini file
  • πŸ““ database module updated

    • target parameter removed. Target gets determined by its path.
    • update command removed. Use the πŸ““ repair module for updating paths.
    • remove command added.

Social

Providing and maintaining open source software comes with some downsides. I'd like to know if anyone is using this software, and what you are doing with it. πŸ˜ƒ

So feel free to follow my project account @MusicDBProject on Twitter and share some screenshots πŸ˜‰

In case you find any bugs, please create an Issue. Feature requests are welcome as well.

Using MusicDB

This section describes how to install, update and use MusicDB.

Requirements

I only test with the latest version of the requirements I list below. If MusicDB breaks when updating dependencies, it's a bug in MusicDB. In case MusicDB does not run on outdated operating systems, update your system ;)

  • A Linux operating system. Tested with:
  • Python3 (At least Python 3.5. I test with Python 3.7)
  • Icecast and GStreamer for streaming
  • A modern web browser for accessing the WebUI:
  • An Unicode capable file system (Any modern file system should work)
  • A terminal that supports Unicode, with an Unicode capable font configured (I use KDE's Konsole with Hack)

The install.sh script checks for tools needed to install MusicDB. Furthermore check.sh list all tools and Python modules needed by MusicDB. You can run the check-script at any time.

Execute pip install -r requirements.txt to install a basic set of Python modules needed for MusicDB.

Download

To get the latest version of MusicDB, clone this repository. The master branch can be considered stable.

git clone https://github.com/rstemmer/musicdb.git

Installation and Update

To install MusicDB, read πŸ““ How to Install MusicDB in the documentation.

For updating, you can also execute cd scripts && ./install.sh && musicdb upgrade --major. Read the Breaking News for manual steps to do before updating to a new major release.

Updating to the next minor version can be done by simply executing git pull && cd scripts && ./update.sh (Be sure you are on the master branch).

Usage

The start page of πŸ““ MusicDB's Documentation should give you the help you need to start - or at least the links to the chapters they do (like the πŸ““ CLI MODULES chapters). The documentation is made for developers, not only users. So there is much more information than you will need to use MusicDB.

In general, the first steps are the following, after you have done the πŸ““ First Run:

  1. πŸ““ Add Music to MusicDB
  2. πŸ““ Create Genres and sub-genres you want to use to categorize your Music.
  3. πŸ““ Create Moods you want to assign to your songs.
  4. Open the WebUI in your browser and tag the albums with the genres you created. (Right click on the albums title in the Album View). Then the random song selection process can start working and stops printing warnings.

Some helpful hints:

  • For security reasons, MusicDB only accepts connections from localhost by default. Change the πŸ““ WebSocket address configuration to access your music from anywhere.
  • Don't be to specific with the genre tags. Tag albums beforehand and songs only when they are currently playing.
  • Set mood-flags only for the current playing song.
  • Check the πŸ““ Configuration of Randy to make sure the random song selection can work with your music collection. When you have a small music collection, decrease the blacklist sizes.

If there are any problems setting up MusicDB, create an issue.

Development

This section describes how to contribute to this project.

Documentation

The πŸ““ MusicDB Documentation is a good point to start. There are all concepts, interfaces and details described.

Most important will be the πŸ““ Quick Start Section that points out some chapters to start reading.

Contributing

Every help is welcome.

What you can do

  • Create an Issue when you find a bug.
  • Improve the documentation.
  • Suggesting features via Issue.
  • See if there is an Issue you are able to fix, or to give hints on how to fix it.
  • Fix bugs or add features.

Before you change code

Versioning and Branches

I work on MusicDB in three sprints per year. Each sprint is about one and a half week long. The rest of the year I only want to concentrate on fixing critical bugs.

There are no classic releases. The MusicDB core has some kind of version number (see VERSION file), but this number does not cover changes in the WebUI, for example.

A reliable change log can be generated by calling git log --oneline. πŸ˜‰

It is also recommended to update whenever there are changes on master. You better not use any other branch than master. πŸ˜‰

Best dates for updating MusicDB are end of January, end of May and end of September.

Major "releases" are not compatible with the previous version of MusicDB. How to update to a next major version will be described in the Breaking News section at the beginning of this README.

The following subsections describe the branches the MusicDB git repository contains.

master branch

This is the main branch and contains the latest stable version of MusicDB. This is the version you should install. If you want to do some changes to the code, you should branch from this branch.

develop branch

This branch is the branch I'm working on. It may contain incomplete features and untested code. If there you have trouble with the master branch, and the git log promises a solution to that problem, you can try using this branch.

When there are lots of commits that are not yet merges with master, you should be very careful. I also do not guarantee that this branch is compatible with the current master branch. Make a backup of your MusicDB data directory before using installing MusicDB from this branch.

mobileapp branch

I'm working on a mobile app that downloads your whole music collection via WLAN onto your smartphone. It is still very experimental and not ready to use. For the app, I use the kivy framework.

Target will only be Android smartphones due to the storage limitation of iOS based devices.

GitHub Releases

Some special old releases are tagged in the git repository. They can be found in GitHubs Releases Section. These are not the latest version of MusicDB and I do not recommend to use them.

About

🎧 A music manager with focus on remote access to your music by having a WebUI and providing an audio stream.

https://rstemmer.github.io/musicdb/

License:GNU General Public License v3.0


Languages

Language:Python 80.4%Language:JavaScript 11.2%Language:Shell 3.6%Language:CSS 3.5%Language:HTML 1.3%