Skip to content

tx3stn/plex2pl

Repository files navigation

plex2pl

Convert your plex playlists into other formats for use with other programs.

Currently support formats:

  • m3u

Upcoming:

  • jellyfin native

Contents

Why

I use plexamp for listening to music, but have migrated all other media to Jellyfin. I wanted to manage my playlist via Plex, but have a compatible solution for other providers for switching in future, or trying out things like FinAmp

Install

Download from GitHub

Find the latest version for your system on the GitHub releases page.

Build it locally

If you have go installed, you can clone this repo and run:

make install

This will build the binary and then copy it to /usr/local/bin/plex2pl so it will be available on your path. Nothing more to it.

Run the Docker container

Get the Docker container from the GitHub container registry.

docker pull ghcr.io/tx3stn/plex2pl:latest

See Running in Docker for more details.

Configuring

All of the configuration required for plex2pl is found in the config file.

The default expected locations for this are:

  • $XDG_CONFIG_DIR/plex2pl/config.json
  • $HOME/.config/plex2pl/config.json

If you want to use a file located somewhere else you can pass the --config flag, e.g.:

plex2pl --config /my/custom/config/file/path/config.json

Tip

To get in editor feedback/validation of your schema, add the following to the top of your json file:

"$schema": "https://raw.githubusercontent.com/tx3stn/plex2pl/refs/heads/main/.schema/schema.json"

plexServerUrl

The url used to access your plex server, from the host device plex2pl is running on.

plexAuthToken

The token required to authenticate the requests against the Plex server.

See their docs on how you can find yours.

OutDirectory

The location of the directory you want to generate the playlists in.

Each playlist will be created as a file with the playlist title as the name inside this directory.

verbose

If you want to see verbose output from the tool running.

Useful for debugging.

Can be enabled at run time (overriding the value in your config file), with the --verbose flag, e.g.:

plex2pl --verbose

Usage

Once your config file is created, just run it:

plex2pl

That's it 🎉

The playlist files will be created in the directory you specified.

Running in Docker

You can run this inside a container, with a few considerations:

  1. Volume mount your output directory So you can create files in the correct place, and not just inside the container.

  2. Volume mount your config A directory called /config is made for this, you can then pass the --config flag to the running command to use this config file.

  3. Specify the right user to run the container as So that your playlist files get created as the expected user to be able to use the created playlists, the example below uses the same user as the host.

  4. Make sure the container can access your plex server. If you're running plex in a container you will need to give access to the smae network plex is running on.

Putting this all together looks like this:

docker run --rm -v "/media/dir/music/playlists:/media/dir/music/playlists" \
	-v "/home/user/.config/plex2pl:/config" \
	--network host \
	-u $(id -u):$(id -g) \
	ghcr.io/tx3stn/plex2pl:latest --config "/config/config.json"

References