Plex2Mix is a Plex music downloader geared towards DJs that self-host their music on a Plex server. It allows downloading selected playlists locally on your computer and dump them into m3u8 files. This is meant to ease the import to DJ software such as Rekordbox, Traktor or Mixxx.
By the time of writing, several reasons make Plexamp unsuitable for DJs.
- Plexamp downloads are not meant to be used by third-party apps.
- Plexamp downloaded playlists are limited to a duration of 24h.
- Plexamp may duplicate tracks that are member of multiple playlists.
- Plexamp dumps playlist information in a
jsonfile that does not contain the playlist title. - The exported format (
json) is not universally recognized by DJ softwares.
Plexamp team is however very reactive in implementing features, the above mentioned limitations might not hold in the future.
please use a virtual environment for the least possible mess while / after setting up
git clone https://github.com/raspberryhead/plex2mix.git
cd plex2mixpython3 -m venv .venv
source .venv/bin/activatepython -m venv .venv
.venv\Scripts\Activate.ps1
⚠️ If you get a security error in PowerShell, run:Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
python -m venv .venv
.venv\Scripts\activate.batpip install -e .plex2mix --helpYou should see the CLI help output.
pip uninstall plex2mix -yDuring the first execution of Plex2Mix, you will be prompted to log in using the provided PIN.
You will also be asked where to store your music library and how many concurrent downloads (threads) to use.
$ plex2mix list
Please visit https://plex.tv/link and enter the following code: 4VPT
Waiting for authorization...
You are logged in as *
0: Server (string)
Select your server []:
Connected to Server
Enter path to download to [~/Music]:
Enter number of download threads [4]:plex2mix listExample output:
0: ❤️ Tracks
1: All Music
2: BadSave specific playlists by index # separated by a space:
plex2mix save 0 1Save all playlists:
plex2mix save --allIgnore a playlist:
plex2mix ignore 2two arguments for download:
playlist→ Save each playlist into its own subfoldernoplaylist→ Save all tracks into a dedicatednoplaylist/folder with Artist/Album subfolders
Examples:
# Saves each playlist into its own folder
plex2mix download playlist
# Saves all tracks into the "noplaylist" folder with Artist/Album subfolders
plex2mix download noplaylistWhen using playlist mode, you can flatten the structure so that all tracks are dumped directly into the playlist folder (no Artist/Album subfolders) with the following command:
plex2mix download playlist --no-subfoldersResult: ~/Music/plex2mix/Chill Vibes/track1.mp3 ~/Music/plex2mix/Chill Vibes/track2.mp3
Additional options:
# Force overwrite existing files
plex2mix download playlist --force
# Export playlists to M3U8 and iTunes XML
plex2mix download playlist --m3u8 --itunes
# Clear unreferenced tracks
plex2mix download playlist --clear
$ plex2mix download --help
Usage: plex2mix download [OPTIONS] [MODE]Download and refresh playlists.
$ plex2mix download --help
Usage: plex2mix download [OPTIONS] [MODE]
Download and refresh playlists.
MODE:
playlist Save each playlist into its own subfolder
noplaylist Save all tracks into a 'noplaylist' folder with Artist/Album subfolders
Options:
-f, --force Force refresh
-c, --clear Clear unreferenced tracks
--itunes Export to iTunes XML
--m3u8 Export to m3u8
--no-subfolders When in playlist mode, dump all tracks directly into the playlist folder (no Artist/Album subfolders).
--help Show this message and exit.
$ plex2mix --help
Usage: plex2mix [OPTIONS] COMMAND [ARGS]...
plex2mix
Options:
--debug Enable debug logging
--help Show this message and exit.
Commands:
config Print config
download Download and refresh playlists.
ignore Ignore playlists
list List playlists
save Save playlists to downloadthere's a separate help menu for the download command as well, since i've added new arguments
$ plex2mix download --help
Usage: plex2mix download [OPTIONS] [MODE]
Download and refresh playlists.
MODE:
playlist → Save each playlist into its own subfolder
noplaylist → Save all tracks into the main library folderMost of the information provided on the first execution can be changed by editing the config.yaml located under:
- Linux:
~/.config/plex2mix/config.yaml - Windows:
%APPDATA%\plex2mix\config.yaml - macOS:
~/Library/Application Support/plex2mix/config.yaml
- Your playlists are downloaded under the specified path.
- In playlist mode, each playlist is saved into its own subfolder.
- In noplaylist mode, all tracks are saved into the main library folder.
- By default, the
m3u8dumps and the iTunes XML are stored in theplaylistssubfolder. - By default, the script will check if the files already exist at the specified path dependant on subfolder structure. You can use
--forceto force the files to redownload regardless of already existing. - REMINDER MOST OPTIONS CAN BE CHANGED BY DIRECTLY EDITING THE CONFIG FILE