PearsonFlyer / LidarrAPI.Metadata

This hosts the custom metadata API and resources Lidarr relies on.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LidarrAPI.Metadata

https://dev.azure.com/Lidarr/Lidarr/_apis/build/status/lidarr.LidarrAPI.Metadata?branchName=develop Codacy Badge

This hosts the custom metadata API and resources Lidarr relies on.

Installation

The metadata server may be installed with pip install . in the root directory or python setup.py install. A development install that is linked to the most recent file versions may be installed with pip install -e . or python setup.py develop.

Running

The metadata API server may be run by executing the server.py file or by the command lidarr-metadata-server that is installed with the installation instructions above.

Docker services

The metadata server requires access to a musicbrainz postgresql database and solr search server.

To initialize a fresh VM, you can use:

#! /bin/bash
curl -fsSL https://get.docker.com | sh
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
apt install -y --no-install-recommends emacs-nox git

To initialize the musicbrainz db run (do not set brainzcode at this point):

docker-compose up -d db
docker-compose run --rm musicbrainz /usr/local/bin/createdb.sh -fetch

To set up the search index triggers, run:

docker-compose up -d indexer musicbrainz
docker-compose exec indexer python -m sir amqp_setup
admin/create-amqp-extension
admin/setup-amqp-triggers install

To set up the search indices, run:

docker-compose run --rm musicbrainz fetch-dump.sh search
docker-compose run --rm search load-search-indexes.sh --force

The database / search indices are now in line with the latest musicbrainz weekly dump. To enable replication, set the brainzcode and run:

docker-compose up -d

And wait for the database / indices to catch up with the latest hourly replication. This could take a long time.

Next create the extra indices lidarr needs in:

lidarrmetadata/sql/CreateIndices.sql

Then you need to set up the lidarr cache:

docker-compose up -d cache-db
docker-compose run --rm crawler
  • docker-compose.yml defines the base services required - the musicbrainz database, server, solr and supporting services.
  • docker-compose.dev.yml exposes ports for the supporting services in docker-compose.yml to allow running the lidarr metadata service on the host.
  • docker-compose.prod.yml runs the lidarr metadata service in docker in addition to the supporting services. Supporting services are not exposed.

About

This hosts the custom metadata API and resources Lidarr relies on.


Languages

Language:Python 89.0%Language:Shell 8.6%Language:JavaScript 1.9%Language:Dockerfile 0.3%Language:HTML 0.1%