PlexDL is a Chrome extension that adds a download button to media items in the Plex web interface, allowing you to save episodes, seasons, or entire shows directly to your local drive.
This project is partly based on the work of PipLongRun.
This repository serves as a proof of concept. I'm working on a more robust, modular version that will be released soon.
🇫🇷 The project was originally created for my dad (in France) to make backups from my selfhosted Plex server.
I wrote a full article (in French) explaining the motivation and how it works:
Read it on LabDuGeek.fr
- Injects a “Download” button next to the default Play button on Plex media pages.
- Supports recursive traversal of shows → seasons → episodes via XML parsing.
- Utilizes a single
content.jsscript for UI, token handling, XML fetching, and download logic. - Uses
background.jsand Chrome’sdownloadsAPI for direct file saving. - Maintains original file names and extensions.
- Clone or download this repository:
git clone https://github.com/badraxas/PlexDL.git cd PlexDL - Open Chrome and navigate to
chrome://extensions. - Enable Developer mode (toggle in the top right).
- Click Load unpacked and select this project’s root directory.
- Open the Plex web app at
https://app.plex.tv - Navigate to a show, season, or episode page.
- Click the Download button that appears next to Play.
- Downloaded files will appear in your default downloads folder.
Note: Chrome queues up to six simultaneous connections per host; additional downloads wait in the queue and cannot be cleared quickly. There are two ways to address this:
- Suspend the download and remove it in the browser's Downloads center.
- Delete all the
.crdownloadfiles in your download directory as new files appear.
manifest.json # Chrome extension manifest
background.js # Service worker handling chrome.downloads calls
content.js # Single content script with all download logic
styles.css # Optional CSS overrides
README.md # This documentation
- content.js:
- Retrieves Plex access token from
localStorage. - Parses Plex resource XML to get
baseUriandaccessToken. - Fetches media metadata XML and invokes
downloadRecursive. downloadRecursive:- If
<Directory>elements are present, follows/childrenlinks recursively. - If
<Video>elements are present, sends download messages for each episode. - Otherwise, downloads the single media part.
- If
- Retrieves Plex access token from
- background.js: Listens for
PLEXDL_DOWNLOADmessages and callschrome.downloads.downloadwith the URL and filename.
- After any change to
content.jsorbackground.js, reload the unpacked extension inchrome://extensions. - Refresh your Plex tab to see changes take effect.
- Use Chrome's Developer Tools console to inspect
[PlexDL]logs.
Contributions are welcome! Please open issues or submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.