it's a music downloader and player app. this is not a streaming app! this is also not a social app or an app for podcasts.
- search for tracks on spotify & play themthem
- create & delete playlistsists
- add & remove tracks from playlistsists
- play music from a playlist either in order or with shuffle
- view & modify the queueueue
- see time-synced lyrics as the track plays
- download individual tracks or all tracks in a playlist
features i thought were cool and deserved to be said even though they don't usually belong in features lists
- errors get properly sent back to the ui and displayed (new playlist, import playlist, playing a track error)
- you can send multiple downloads for a track and only one download will occur (and if there's an error in that one download, the responses to all requests will show that error).
- the search is ordered effectively and results get cached in the psql db so it can be faster
- the update.sh script is so useful
- it updates the browser's mediaSession API so it'll be more integrated with your system.
- it uses spotdl to retrieve metadata about tracks and links to their corresponding music tracks on youtube.
- this metadata is saved into the database.
- yt-dlp is then used to download the music track from youtube.
the search is done using the spotify search api. while i was making this app, it's taken a recent hit with the loss of the popularity field
yeah! it's here.
view this folder.
notes
- you're going to need to create a Web SDK app on the Spotify Developer Dashboard. make sure to have the client id and client secret ready when setting environment varaibles.
| name | specify when? | default | description |
|---|---|---|---|
| DEBUG | always | false | true or false. enables debug mode. insecure if true. |
| SPOTIFY_CLIENT_ID | always | -- | spotify application client id (find this in the spotify dev dashboard) |
| SPOTIFY_CLIENT_SECRET | always | -- | spotify application client secret (find this in the spotify dev dashboard) |
| PORT | always | -- | the port for the container to expose on the host. |
| SERVER_URL | always | -- | the accessible base URL of the backend. (e.g. http://localhost:8080 or http://192.168.1.67:7000 or https://example.com) |
| STORAGE_URL | optional | -- | if you want to use a tiredkangaroo/storage instance to store user images, specify the base url (e.g. https://storage.mechanicaldinosaurs.net). this app will otherwise store and serve images locally (see DATA_PATH). |
| STORAGE_API_SECRET | optional | -- | if you want to use a tiredkangaroo/storage instance to store user images, specify the api secret. this app will otherwise store and serve images locally (see DATA_PATH). |
| CERT_PATH | optional | -- | if you want to use TLS, specify the path to the PEM-encoded certificate. when using docker-compose, your certificate MUST be in the same folder (or a subfolder) as your Dockerfile and docker-compose.yml (that you will run docker-compose in) and the CERT_PATH should be relative to this folder. |
| KEY_PATH | optional | -- | if you want to use TLS, specify the path to the PEM-encoded key. when using docker-compose, your key MUST be in the same folder (or a subfolder) as your Dockerfile and docker-compose.yml (that you will run docker-compose in) and the KEY_PATH should be relative to this folder. |
- set the [environment variables] necessary to run this app.
- run with docker compose:
docker-compose up
it's not actually that bad, i hope.
- you're going to need a database in postgres to connect to. make sure you've already run schema.sql on it. if your postgres is local on port 5432, you can just run the
./resetdb.shscript. - you're going to need to download spotdl with ffmpeg and yt-dlp (and preferably have them in
$PATH).
| name | specify when? | default | description |
|---|---|---|---|
| DEBUG | always | false | true or false. enables debug mode. insecure if true. |
| SPOTIFY_CLIENT_ID | always | -- | spotify application client id (find this in the spotify dev dashboard) |
| SPOTIFY_CLIENT_SECRET | always | -- | spotify application client secret (find this in the spotify dev dashboard) |
| POSTGRES_URL | always | postgres://musicer:@localhost:5432/music | postgres connection string. docker compose provisions postgres so this should never be specified when using compose. it should link to a database that has the schema already on it. see this to help you format a postgres connection url. |
| SERVER_URL | always | -- | the accessible base URL of the backend. (e.g. http://localhost:8080 or http://192.168.1.67:7000 or https://example.com) |
| SERVER_ADDRESS | optional | :8080 | the address for the server to bind to. |
| DATA_PATH | optional | /var/lib/musicer/data | directory to store downloaded music and temporary files of metadata. also used as storage if not using tiredkangaroo/storage instance. |
| STORAGE_URL | optional | -- | if you want to use a tiredkangaroo/storage instance to store user images, specify the base url (e.g. https://storage.mechanicaldinosaurs.net). this app will otherwise store and serve images locally (see DATA_PATH). |
| STORAGE_API_SECRET | optional | -- | if you want to use a tiredkangaroo/storage instance to store user images, specify the api secret. this app will otherwise store and serve images locally (see DATA_PATH). |
| CERT_PATH | optional | -- | if you want to use TLS, specify the path to the PEM-encoded certificate. |
| KEY_PATH | optional | -- | if you want to use TLS, specify the path to the PEM-encoded key. |
- clone this project
git clone https://github.com/tiredkangaroo/music
- change your working directory to the frontend (
ui), install dependencies, and build.
cd ui
npm i
npm run build
d
-
download the binary from the latest release page. choose the one that corresponds with your operating system and cpu architecture. note: you'll need postgres.
-
set the environment variables necessary. run the binary you just downloaded.
-
done! visit the url shown in the terminal.
this project is cool and all, but: support your artists!