GitHub

-

Plex Playlist Tool logo

Plex Playlist Tool

What is Plex Playlist Tool?

If you manage a large music library in Plex, you already know the gap between having music and organizing it into playlists. Plex is excellent at playback and library management, but assembling playlists from scattered sources—your own ratings, Spotify discoveries, spreadsheet exports, or a vague mood in your head—can be slow and repetitive.

Plex Playlist Tool is a self-hosted web app that sits beside your Plex server and focuses on one job: find tracks, match them to your library, and drop them into Plex playlists quickly. The interface is a simple two-column layout: candidate tracks on the left, your Plex playlists on the right. Everything else—search, imports, matching, keyboard shortcuts, and drag-and-drop—is built to keep you in flow.

You run it on your own hardware (or via Docker), connect Plex once, and optionally wire up Spotify and OpenAI. Your tokens and settings stay in a local SQLite database, not in a third-party cloud service for playlist editing.

The Plex Search tab is the starting point when you already know what you want—or roughly what you want—from your own library. You can filter by artist, track name, minimum star rating, or unrated tracks only. Results come straight from your Plex music library, so every row you see is a real track you can add to a playlist immediately.

Search is designed for incremental refinement rather than one-shot perfection. Maybe you remember the artist but not the exact title, or you want everything by a band above three stars. The app issues targeted Plex queries instead of loading your entire library into the browser, which keeps the experience responsive even on large collections.

Because search results are native Plex tracks, there is no "matching" step: what you select is what you get. That makes this tab ideal for curating from your existing ratings and metadata, or for cleaning up playlists when you already know the recordings live in your library.

Spotify playlist matching

Many people discover music on Spotify but listen on Plex. The Spotify tab closes that gap. After you connect a Spotify API application in Settings, you can load playlists you own or collaborate on, paste a public playlist link, and import the track list into the app.

The important detail is how matching works. Tracks appear in the list right away with a "checking Plex" state, and the app matches each row to your Plex library in the background—several at a time—using exact search first and a wider fuzzy match when needed. You see progress as rows resolve, can stop matching mid-run, and only Plex-confirmed tracks can be selected for playlist actions. Rows that never match stay visible so you know what is missing from your library.

Spotify's API limits which playlists you can read; followed playlists you do not own may not load. The UI explains that case and nudges you toward owned playlists, duplicates, or public URLs. For many users, this tab alone replaces hours of manual "Spotify → search Plex → add" repetition.

AI suggestions

The AI suggestionstab is for when you have a vibe, theme, or occasion in mind but not a ready-made track list. You describe the playlist you want in plain language—for example, "10 tracks for a late-night drive with synthwave and electronic grooves." Optionally, a random-prompt button fills the text area with a curated example so you can explore without staring at a blank box.

When you click Generate, the app sends your prompt to OpenAI (configured with GPT-4.1 mini in Settings) and asks for a structured list of artist and title pairs. Those suggestions land in the track list immediately; Plex matching then runs asynchronously, the same way as Spotify imports. You get creative breadth from the model and library accuracy from Plex.

Unmatched suggestions remain visible but cannot be selected, so you always know what Plex could not resolve.

CSV import

Not every track list lives in Spotify or in your head. The CSV tab imports spreadsheets with artist and track name columns. A downloadable template keeps the format obvious, and the file picker is built for real-world exports from Excel, Numbers, or other tools—including encodings like UTF-8, Windows-1252, and Mac Roman so apostrophes and accents survive import.

As with Spotify and AI suggestions, parsing is fast and Plex matching is async. You are not stuck waiting for the entire library to be scanned before seeing a single row. Legacy column names such as track title still work for older files.

CSV import is ideal for sharing lists between people, migrating from other tools, or batch-building playlists from charts, radio logs, or concert setlists without retyping metadata.

Playlist workflow

The right-hand playlist panel is where tracks become playlists. You can open multiple Plex playlists side by side, see track counts, and spot duplicates highlighted when the same title and artist appear more than once.

On the left, multi-select works with click, shift-range selection, and select-all that respects only Plex-matched rows on import tabs. Keyboard shortcuts add selected tracks to the first ten loaded playlists (A through J), rate the selection with 05 (zero clears the rating), and support efficient playlist building without constant mouse travel. Drag-and-drop lets you drop one or many tracks onto a playlist; the drag preview lists up to four titles plus an overflow line when you move a large selection.

Inside a playlist, you can reorder tracks, remove items, copy or move tracks to another playlist (Shift influences move vs copy on cross-playlist drops), create new playlists, and preview playback via Plexamp when configured. Export a playlist as CSV or a ZIP bundle for backup or use outside Plex.

Each source tab—search, Spotify, AI, CSV—remembers its own track list and selection when you switch tabs, so you can compare sources without losing your place.

Settings, privacy, and deploy

Setup is intentionally local. Sign in with Plexuses Plex's official pin flow; tokens are stored on your server in SQLite under a datadirectory that should never be committed to git. Spotify uses a standard OAuth redirect to your instance. The OpenAI API key is optional and stored server-side like other secrets—only a "key is saved" flag is shown in the UI.

A published Docker image supports linux/amd64 and linux/arm64, with Compose pulling a prebuilt image or building from source. In development, the Vue frontend and FastAPI backend run separately with hot reload; production serves the built UI from the API container on port 8000.

The project is open source under the MIT license, with unit tests on the backend (pytest), and frontend tests (Vitest and Playwright) covering matching logic, playlist operations, and core UI flows.

Who is it for?

Plex Playlist Tool is for home listeners and collectors who treat Plex as the source of truth but still discover music elsewhere—or want help brainstorming lists. It does not replace Plex's player or server administration; it makes playlist assembly faster, more accurate, and more pleasant.

Clone the repo or pull the Docker image, point it at your library, and spend less time searching and more time listening.

Tech Stack

Vue 3
TypeScript
Vite
VitestUnit and component tests
PlaywrightEnd-to-end tests
Python
FastAPI
Uvicorn
Pydantic
plexapiPlex server and OAuth
spotipySpotify Web API
httpxOpenAI Chat Completions
SQLite
Docker
Docker Compose
Node.js
pytestBackend testing
Spotify Web API
OpenAI API
PlexampOptional preview