A tool for creating Plex playlists or collections from RED collages
Project description
red-plex
red-plex is a command-line tool for creating and updating Plex collections based on collages and bookmarks from Gazelle-based music trackers (Redacted “RED” and Orpheus “OPS”). It stores all data in a local SQLite database and provides commands to synchronize your music library with Plex and the torrent data from these trackers.
Table of Contents
Overview
- Stores Data in SQLite: Instead of CSV-based “caches,” red-plex now stores albums, collages, and bookmarks in a lightweight SQLite database.
- Collages & Bookmarks: Fetch and manage torrent-based “collages” or personal “bookmarks” from Gazelle-based sites.
- Plex Integration: Compare the torrent group info with your Plex music library to create or update Plex collections.
- Incremental Updating: Update previously created collections as new albums become available or site data changes.
Features
- Multi-Site: Works with Redacted (“red”) and Orpheus Network (“ops”).
- Collections from Collages/Bookmarks: Create or update entire Plex collections for each collage or bookmarked set.
- Local SQLite Database: All data (albums, collages, bookmarks) is kept in one DB—no more CSV.
- Configurable Logging: Choose between INFO, DEBUG, etc., in
config.yml. - Rate Limiting: Respects site rate limits and retries on errors.
- Simple CLI: All major tasks are accessed via subcommands like
collages,bookmarks,db, etc. - Python 3.8+ Compatible: Runs on modern Python versions with no external database dependencies.
Installation
You can install red-plex using pip:
pip install red-plex
Or install in an isolated environment with pipx:
pipx install red-plex
Usage & Commands
Below is a brief overview of the main commands. Type red-plex --help for more details.
Configuration Commands
# Show current configuration (YAML)
red-plex config show
# Edit configuration in your default editor
red-plex config edit
# Reset configuration to default values
red-plex config reset
Collages
# Create Plex collections for specific collage IDs
red-plex collages create [COLLAGE_IDS] --site [red|ops]
# Update all collages in the database, re-checking the site data
red-plex collages update
Bookmarks
# Create Plex collections from your bookmarked releases
red-plex bookmarks create --site [red|ops]
# Update all bookmarks in the database
red-plex bookmarks update
Database Commands
# Show or manage the SQLite database
# Show database location
red-plex db location
# Manage albums table
red-plex db albums reset # Clear all album records
red-plex db albums update # Pull fresh album info from Plex
# Manage collections table
red-plex db collections reset # Clear the collage collections table
# Manage bookmarks table
red-plex db bookmarks reset # Clear the bookmark collections table
Examples
Creating Collections
From a single collage (on Redacted):
red-plex collages create 12345 --site red
From multiple collages (on Orpheus):
red-plex collages create 1111 2222 3333 --site ops
From your bookmarks (on RED or OPS):
red-plex bookmarks create --site red
(Prompts if a collection already exists.)
Updating Collections
Update all stored collages:
red-plex collages update
Update all stored bookmarks:
red-plex bookmarks update
Update albums from Plex:
red-plex db albums update
Configuration Details
Your configuration is kept in a YAML file (by default ~/.config/red-plex/config.yml on Linux/macOS). Example:
LOG_LEVEL: INFO
OPS:
API_KEY: your_ops_api_key_here
BASE_URL: https://orpheus.network
RATE_LIMIT:
calls: 4
seconds: 15
PLEX_TOKEN: your_plex_token_here
PLEX_URL: http://localhost:32400
RED:
API_KEY: your_red_api_key_here
BASE_URL: https://redacted.sh
RATE_LIMIT:
calls: 10
seconds: 10
SECTION_NAME: Music
Configuration Tips
If accessing Plex via HTTP fails, you can fetch an HTTPS URL by calling:
https://plex.tv/api/resources?includeHttps=1&X-Plex-Token={YOUR_TOKEN}
The result includes an XML <Device> node with a secure uri=.... That plex.direct address can be used as your plex_url.
Considerations
- Album Matching: File and folder naming must be consistent enough to match the torrent’s path with your Plex library’s path.
- Database: All data (albums, collages, bookmarks) is in
red_plex.db. You can reset specific tables withdb albums reset, etc. - Site Credentials: Provide valid API keys for each site in
config.yml. - Rate Limits: The tool respects each site’s call/seconds settings to avoid spamming.
- Logging: Set
log_levelto"DEBUG"for more details,"WARNING"or higher for fewer logs. - Updates: Running
collages updateorbookmarks updateadds newly matched albums, but won’t remove items from Plex collections unless you specifically handle that scenario.
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 red_plex-1.9.1.tar.gz.
File metadata
- Download URL: red_plex-1.9.1.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7808008ae56302755375555c12b16e5d2eb78f922a098c0066d5b5da6eef44a5
|
|
| MD5 |
95f609fd8ceac6392daec224ba56aca2
|
|
| BLAKE2b-256 |
e3fbd8f11139b010090411f297f1a243d3b959ddb86e10b86e52b09701b5b511
|
File details
Details for the file red_plex-1.9.1-py3-none-any.whl.
File metadata
- Download URL: red_plex-1.9.1-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1131d949e70a3277858c2e9b4e72421c686fc98bbce9acec8b7e2431d5a005e9
|
|
| MD5 |
f82a103a5dda7d04cef674fa89278ede
|
|
| BLAKE2b-256 |
699fd2659b502f2ff52a2660efa18a31c815f68042a6f9c17903146e0e25454c
|