From 20f03552136a99098b78857bc2fe39c3298cfd8b Mon Sep 17 00:00:00 2001 From: 0xf4b1 <10889432+0xf4b1@users.noreply.github.com> Date: Sun, 24 Dec 2023 19:24:32 +0100 Subject: [PATCH] Update README.md --- README.md | 59 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7a9d4f6..11cfb5e 100644 --- a/README.md +++ b/README.md @@ -15,26 +15,38 @@ As with Beatport streaming, Traktor does not allow to use the build-in recorder. The project now contains a fully crafted Beatport license file that allows the server to handle linking and authentication, with enabling all features such as track analysis and simultaneous playback of multiple decks. You no longer need to take care of the license file or have a Beatport account with subscription! :) -## Docker +Please note this project and the setup instructions are only tested on macOS. While it is possible to set it up on Windows in a similar way, Traktor on Windows uses different client certificates and does not work with the license file in this project (but there is a trick to get it working https://github.com/0xf4b1/traktor-streaming-proxy/issues/13#issuecomment-1742184706). + +## Setup + +1. You need to create a SSL certificate for the domain `api.beatport.com`. +You can use the script in `cert/gen-cert.sh` to generate a new CA and the server certificate. You have to import the CA certificate into the trust store of the device running Traktor. + +2. Configure the server by adjusting the `config.properties` file in the project directory. Both Spotify and Tidal sources require an account. + +3. You can now choose between a prebuilt Docker container (3.1) or a manual setup (3.2) and continue in both cases with 4. + +3.1 Docker Run the server in the Docker container with the following command: ``` -docker run -p 443:443 -v :/app/cert/server.crt -v :/app/cert/server.key -v :/app/config.properties -v :/app/license ghcr.io/0xf4b1/traktor-streaming-proxy:latest +docker run -p 443:443 -v :/app/cert/server.crt -v :/app/cert/server.key -v :/app/config.properties ghcr.io/0xf4b1/traktor-streaming-proxy:latest ``` -## Building +OR + +3.2 Manual + +3.2.1 Building + +Build the project with the following command: ``` ./gradlew build ``` -## Setup - -1. You need to create a SSL certificate for the domain `api.beatport.com`. -You can use the script in `cert/gen-cert.sh` to generate a new CA and the server certificate. You have to import the CA certificate into the trust store of the device running Traktor. - -2. Install and configure nginx with SSL and a proxy_pass to this server. +3.2.2 Install and configure nginx with SSL and a proxy_pass to this server. Edit nginx site config `/etc/nginx/sites-available/default` with the following parts: @@ -56,7 +68,9 @@ server { Then reload the changed configuration in nginx. -3. Start the API server with `./gradlew run` +3.2.3 (Optional) Install ffmpeg on your system if you want to use spotify source. + +3.2.4 Start the API server with `./gradlew run` 4. Redirect `api.beatport.com` to the server by adding the following to `/private/etc/hosts` on macOS @@ -73,10 +87,27 @@ curl https://api.beatport.com/v4/catalog/genres/ The command should succeed and show some output in JSON. If you get SSL certificate errors, you need to fix the configuration. -## Running +6. Run Traktor. If you are not yet linked with the server, open settings and connect to Beatport streaming. You should receive an immediate redirect which connects Traktor. -1. Start the server with `./gradlew run` +7. Done! If you navigate to Beatport Streaming, you should be able to browse through the predefined categories and use the search box to find content. -2. Run Traktor. If you are not yet linked with the server, open settings and connect to Beatport streaming. You should receive an immediate redirect which connects Traktor. +## Library Mapping -3. If you navigate to Beatport Streaming, you should be able to browse through the playlists from the sources and use the search box to find content. \ No newline at end of file +Beatport Streaming has the following predefined categories, which we try to match to our available sources in the best possible way. +The genres are identical in each category, which is why we use them to differentiate between the sources. + +``` +Curated Playlists +- --> source + - --> followed artists + - --> tracks from artist +Genres +- --> source + - --> saved/liked tracks in source +Playlists +- --> playlists (all sources merged) + - --> tracks from playlist +Top 100 +- --> source + - --> generated playlist of new released tracks +``` \ No newline at end of file