Sync rekordbox playlists to Plexamp/Plex
Project description
rekordbox-plexamp-sync
Available at https://pypi.org/project/rekordbox-plexamp-sync/0.1.0/
Sync rekordbox playlists to Plexamp/Plex - available as both a Python package and CLI tool.
Features
- 🎵 Sync all rekordbox playlists to Plex/Plexamp
- 🚀 Fast track matching using pre-built maps
- 📦 Available as a Python package for integration into other apps
- 💻 Command-line interface for manual syncing
- 🔄 Smart playlist detection and skipping
- 📊 Detailed sync reports with track-level information
How it works
This tool extracts all playlists from the rekordbox database, then interacts with the Plex Media Server API to create or update playlists.
Note: This will only work if your rekordbox library is indexed by Plex. Make sure you deactivate all content matchers for Albums so that Plex does not match and rename tracks. This messes with the track matching to rekordbox - the titles need to be identical for better results.
Installation
As a Package (for integration into other apps)
# Install from local build
pip install dist/rekordbox_plexamp_sync-0.1.0-py3-none-any.whl
# Or install in development mode
pip install -e .
# Or from PyPI (after publishing)
pip install rekordbox-plexamp-sync
For CLI Usage
# Clone the repository
git clone <your-repo-url>
cd rekordbox-plexamp-sync
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install the package
pip install -e .
# Build the Go shared library
make
Usage
As a CLI Tool
# Basic usage
rekordbox-plexamp-sync http://localhost:32400 your-plex-token
# With verbose output
rekordbox-plexamp-sync http://localhost:32400 your-plex-token --verbose
# Get help
rekordbox-plexamp-sync --help
Legacy CLI (still works):
python app.py http://localhost:32400 your-plex-token --verbose
As a Python Package
from plexapi.server import PlexServer
from rekordbox_plexamp_sync import (
Logger,
build_plex_track_map,
build_plex_playlist_map,
get_playlists,
)
from rekordbox_plexamp_sync.core import sync_playlists
# Initialize
logger = Logger(verbose=False)
plex = PlexServer('http://localhost:32400', 'your-token')
# Get rekordbox playlists
rekordbox_playlists = get_playlists()
# Build maps (cache these for performance)
track_map = build_plex_track_map(plex, logger)
playlist_map = build_plex_playlist_map(plex, logger)
# Sync
result = sync_playlists(
plex=plex,
rekordbox_playlists=rekordbox_playlists,
track_map=track_map,
playlist_map=playlist_map,
logger=logger,
)
# Check results
print(f"Created: {len(result['created_playlists'])}")
print(f"Updated: {len(result['updated_playlists'])}")
In a macOS Menu Bar App
See examples/menubar_app_example.py for complete examples using rumps, pystray, and other frameworks.
import rumps
from rekordbox_plexamp_sync import sync_rekordbox_to_plex
class RekordboxSyncApp(rumps.App):
@rumps.clicked("Sync Now")
def sync_now(self, _):
result = sync_rekordbox_to_plex(
server_url="http://localhost:32400",
token="your-token",
verbose=False
)
rumps.notification(
title="Sync Complete",
message=f"Created: {len(result['created_playlists'])}"
)
RekordboxSyncApp("Rekordbox Sync").run()
Usage (windows)
I don't have a windows machine to try this on, but build the shared library with Golang.
Edit main.go and change the rekordbox pathes. Check the go-rekordbox README about where to find these pathes:
optionsFilePath := filepath.Join(homeDir, "/Library/Application Support/Pioneer/rekordboxAgent/storage/", "options.json")
// Files and paths
asarPath := "/Applications/rekordbox 6/rekordbox.app/Contents/MacOS/rekordboxAgent.app/Contents/Resources/app.asar"
Then build the shared lib and generate a dll
go build -buildmode=c-shared -o library.dll main.go
Update app.py get_playlists() to load the new dll instead:
library = ctypes.cdll.LoadLibrary('./library.dll')
Then, follow steps from "Usage (mac)"
Limitations and todos
- Intelligent Playlists aren't supported yet, this needs some extra work
- Matching happens against filename and then title as backup, this can still be improved
Getting Your Plex Token
- Open Plex Web App in your browser
- Open browser developer tools (F12)
- Go to Application/Storage → Local Storage
- Look for
myPlexAccessToken
Alternatively, you can find it by following Plex's official guide.
Building the Package
# Install build tools
pip install build twine
# Build the Go shared library
make
# Build the Python package
python -m build
# Output will be in dist/:
# - rekordbox_plexamp_sync-0.1.0-py3-none-any.whl (installable package)
# - rekordbox_plexamp_sync-0.1.0.tar.gz (source distribution)
For detailed packaging instructions, see PACKAGING.md.
Documentation
- PACKAGING.md - Complete guide for packaging and distribution
- examples/menubar_app_example.py - Integration examples for menu bar apps
Requirements
- Python 3.8+
- macOS (for the Go shared library)
- Plex Media Server with music library
- rekordbox 6
Limitations and TODOs
- Smart/Intelligent Playlists aren't supported yet (requires extra work)
- Matching happens against filename first, then title as backup (can be improved)
- Currently macOS only (Windows support needs testing and binary compilation)
Acknowledgements
This tool is powered by:
- go-rekordbox - SDK to interact with the rekordbox database
- python-plexapi - Python bindings for the Plex API
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rekordbox_plexamp_sync-0.1.2.tar.gz.
File metadata
- Download URL: rekordbox_plexamp_sync-0.1.2.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ae7d24c267801d0d77e57b28c84c851746a5da84ab0f1a6e8e4d3eaabe69881
|
|
| MD5 |
a482c2c4983c69c79f42f231b9ea230c
|
|
| BLAKE2b-256 |
c843deab66a473d8070d60628892812f8bb6177fe2419e24fbffd42b6bf9967c
|
File details
Details for the file rekordbox_plexamp_sync-0.1.2-py3-none-any.whl.
File metadata
- Download URL: rekordbox_plexamp_sync-0.1.2-py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7c929135d1db2e50f5b73d08be3d2e20ab833dfcd9ac1d34bb0855b192a6331
|
|
| MD5 |
c24cc2c5c4a48451d52155794f2c0ff7
|
|
| BLAKE2b-256 |
e170281b4c5c8849c7e1dc3163a798133daba70e0fccda0ef0b7a07612ba8055
|