### Mutagen Installation Script Source: https://musicbrainz.org/doc/Picard_Qt/Mac_Install_Guide This script installs the Mutagen library, which is used for handling audio metadata. It involves building and then installing the package using Python's setup tools. ```bash python setup.py build sudo python setup.py install ``` -------------------------------- ### PyQt4 Installation Script Source: https://musicbrainz.org/doc/Picard_Qt/Mac_Install_Guide These commands are used to install PyQt4, a Python binding for the Qt application framework. It involves configuring, building, and installing the package. ```bash python configure.py make sudo make install ``` ```bash python configure.py make sudo make install ``` -------------------------------- ### Expat2 Installation Script Source: https://musicbrainz.org/doc/Picard_Qt/Mac_Install_Guide This script installs the Expat2 library, an XML parser. It involves configuring the build with a specified prefix, compiling the library, and then installing it. ```bash ./configure --prefix=/usr/local make buildlib sudo make installlib ``` -------------------------------- ### LibOfa Installation Script Source: https://musicbrainz.org/doc/Picard_Qt/Mac_Install_Guide Instructions to install the LibOfa library, including copying a necessary script from libtool and then configuring, building, and installing the library. It also notes a workaround for PUID generation issues. ```bash ./configure --prefix=/usr/local make sudo make install ``` -------------------------------- ### Gettext Installation Script Source: https://musicbrainz.org/doc/Picard_Qt/Mac_Install_Guide This script installs the gettext package, which is required for localization support when compiling PicardQT. It shows how to download, extract, configure, build, and install gettext. ```bash curl -O ftp://mirrors.kernel.org/gnu/gettext/gettext-0.16.tar.gz or wget ftp://mirrors.kernel.org/gnu/gettext/gettext-0.16.tar.gz tar -xzvf gettext-0.16.tar.gz ./configure --prefix=/usr/local make sudo make install ``` -------------------------------- ### Install and Configure PostgreSQL for MusicBrainz Source: https://musicbrainz.org/doc/MusicBrainz_NGS_Database_Install_for_Mac Commands to remove existing PostgreSQL installations, install dependencies via MacPorts, build PostgreSQL from source, and initialize the database cluster. ```bash sudo rm -r /usr/local/pgsql/ port gmake ./configure gmake gmake install adduser postgres mkdir /usr/local/pgsql/data sudo chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 & /usr/local/pgsql/bin/createuser -U postgres musicbrainz /usr/local/pgsql/bin/createuser -U postgres paul /usr/local/pgsql/bin/createdb -T template0 --owner musicbrainz --encoding=UNICODE musicbrainz ``` -------------------------------- ### Build and Install PicardQt from Source Source: https://musicbrainz.org/doc/Picard_Qt/Mac_Install_Guide This sequence of commands configures the build environment with necessary include paths, compiles the extensions in-place, and installs the application to the system. It assumes the source code has been downloaded and extracted. ```bash python setup.py config -I /usr/local/include:/usr/local/include/ffmpeg/ python setup.py build_ext -i python setup.py install ``` -------------------------------- ### Release Search Example Source: https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2/Search An example of a GET request to search for releases on the MusicBrainz API. ```APIDOC ## Release Search API ### Description This endpoint allows you to search for releases based on various criteria, such as title and artist. The example shows a query for releases titled 'Schneider' and related to 'Shake'. ### Method GET ### Endpoint /ws/2/release/ ### Parameters #### Query Parameters - **query** (string) - Required - The search query string. Can include terms like 'release:', 'artist:', etc. ### Request Example ``` http://musicbrainz.org/ws/2/release/?query=release:Schneider%20AND%20Shake ``` ### Response #### Success Response (200) - The response will be in JSON or XML format (depending on the request) and will contain a list of matching releases. #### Response Example (Response structure will vary based on the query, typically includes release titles, artist information, and release dates.) ``` -------------------------------- ### Server Setup Source: https://musicbrainz.org/doc/Developer_Resources Instructions and considerations for setting up a MusicBrainz server instance. ```APIDOC ## Server Setup ### Description Setting up a MusicBrainz server involves obtaining the source code and following installation instructions. It requires a PostgreSQL database. This section provides guidance on the process and related configurations. ### Source Code and Installation - The MusicBrainz Server is not available as an executable. You must checkout the source code and follow the `INSTALL` file's instructions. ### Database Requirements - The MusicBrainz Database contains all metadata and is available for download. - Requires access to a PostgreSQL database. - Refer to server setup instructions or third-party guides for assistance. ### Environment Variables - Server environment variables that may prove useful are documented. ### Related Search Terms - Search Server Setup - Search Indexer Setup ``` -------------------------------- ### Recording Search Example Source: https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2/Search This snippet demonstrates how to query the MusicBrainz API for recordings using an ISRC (International Standard Recording Code). The example URL shows a GET request to the recording endpoint with a specific ISRC parameter. ```http http://musicbrainz.org/ws/2/recording/?query=isrc:GBAHT1600302 ``` -------------------------------- ### GET /ws/2/work/{MBID}?inc=series-rels Source: https://musicbrainz.org/doc/MusicBrainz_API/Examples Retrieves detailed information about a specific work, including its relationships to series, with an example of how relationship attributes are represented. ```APIDOC ## GET /ws/2/work/{MBID}?inc=series-rels ### Description Retrieves detailed information about a specific work, including its relationships to series. This endpoint is useful for understanding how works are cataloged and related to series, such as thematic or opus number series. ### Method GET ### Endpoint /ws/2/work/{MBID}?inc=series-rels ### Parameters #### Path Parameters - **MBID** (string) - Required - The MusicBrainz Identifier for the work. #### Query Parameters - **inc** (string) - Optional - Specifies additional information to include in the response. `series-rels` includes series relationships. ### Request Example ``` https://musicbrainz.org/ws/2/work/c1b0e8a2-2461-4d48-9a89-f4e6d624d342?inc=series-rels ``` ### Response #### Success Response (200) - **id** (string) - The MBID of the work. - **title** (string) - The title of the work. - **type-id** (string) - The MBID for the work's type. - **type** (string) - The type of the work (e.g., Symphony). - **language** (string) - The primary language of the work. - **languages** (array) - A list of languages associated with the work. - **attributes** (array) - A list of attributes associated with the work (e.g., Key). - **relations** (array) - A list of relationships the work has with other entities, such as series. #### Response Example ```json { "id": "c1b0e8a2-2461-4d48-9a89-f4e6d624d342", "title": "Sinfonie Nr. 1 c-Moll, op. 68", "type-id": "174314aa-0aa4-30cf-96a6-50b281d8d208", "type": "Symphony", "language": "zxx", "languages": ["zxx"], "attributes": [ { "value-id": "d3d0b554-d3f4-3995-b995-5113f3771295", "type-id": "7526c19d-3be4-3420-b6cc-9fb6e49fa1a9", "type": "Key", "value": "C minor" } ], "relations": [ { "direction": "backward", "target-credit": "", "type-id": "b0d44366-cdf0-3acb-bee6-0f65a77a6ef0", "source-credit": "", "begin": null, "target-type": "series", "ended": false, "series": { "type": "Catalogue", "type-id": "49482ff0-fc9e-3b8c-a2d0-30e84d9df002", "disambiguation": "", "id": "03531d5b-11e8-40c9-9fc3-d814e9886590", "name": "Johannes Brahms. Thematisch-Bibliographisches Werkverzeichnis" }, "attribute-ids": { "number": "a59c5830-5ec7-38fe-9a21-c7ea54f6650a" }, "attributes": ["number"], "ordering-key": 114, "type": "part of", "attribute-values": { "number": "op. 68" }, "end": null } ] } ``` ``` -------------------------------- ### Fetch Event Data with Artist and Place Relations (API Request) Source: https://musicbrainz.org/doc/MusicBrainz_API/Examples This is an example of a GET request to the MusicBrainz API to retrieve details about a specific event. It includes parameters to fetch related artist and place information. The response is in XML format. ```HTTP https://musicbrainz.org/ws/2/event/fe39727a-3d21-4066-9345-3970cbd6cca4?inc=aliases+artist-rels+place-rels ``` -------------------------------- ### Retrieve Release with Relationships via MusicBrainz API Source: https://musicbrainz.org/doc/MusicBrainz_API/Examples This example demonstrates an HTTP GET request to the MusicBrainz web service to fetch a release entity. It includes multiple parameters to expand the response with artist credits, labels, recordings, and specific relationship types. ```http GET https://musicbrainz.org/ws/2/release/987f3e2d-22a6-4a4f-b840-c80c26b8b91a?inc=artist-credits+labels+recordings+recording-level-rels+work-rels+work-level-rels+artist-rels ``` ```xml Become Desert Official 1 Become Desert ``` -------------------------------- ### Get Collection Description (GET) Source: https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2 Retrieve the description of a collection by performing a GET request with the collection's MBID. ```http GET /ws/2/collection/4a0a2cd0-3b20-4093-bd99-92788045845e ``` -------------------------------- ### Setup Feature Branch for Contribution Source: https://musicbrainz.org/doc/Development/Git Commands to clone a personal fork, create a new feature branch based on the beta branch, and add the upstream remote for synchronization. ```bash git clone https://github.com//musicbrainz-server.git musicbrainz-server cd musicbrainz-server git checkout -b my-cool-feature beta git remote add upstream https://github.com/metabrainz/musicbrainz-server.git ```