You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
A command-line tool for creating and updating Plex collections based on collages and bookmarks from Gazelle-based music trackers like **Redacted** ("RED") and **Orpheus Network** ("OPS").
8
+
9
+
red-plex bridges the gap between your curated music collections on private trackers and your personal Plex media server, automatically creating and maintaining Plex collections that mirror your tracker collages and bookmarks.
10
+
11
+
## Quick Start
12
+
13
+
1.**Install red-plex**: `pip install red-plex`
14
+
2.**Configure your API keys**: `red-plex config edit`
15
+
3.**Create your first collection**: `red-plex collages convert 12345 --site red`
16
+
17
+
## What are RED and OPS?
18
+
19
+
-**Redacted (RED)**: A private music tracker focused on high-quality audio files
20
+
-**Orpheus Network (OPS)**: Another private music tracker with curated content
21
+
- Both use the Gazelle framework and offer "collages" (curated collections) and personal bookmarks
-**Stores Data in SQLite**: Instead of CSV-based “caches,” red-plex now stores albums, collages, and bookmarks in a lightweight SQLite database.
28
-
-**Collages & Bookmarks**: Fetch and manage torrent-based “collages” or personal “bookmarks” from Gazelle-based sites.
129
+
- **Stores Data in SQLite**: Instead of CSV-based "caches," red-plex now stores albums, collages, and bookmarks in a lightweight SQLite database.
130
+
- **Collages & Bookmarks**: Fetch and manage torrent-based "collages" or personal "bookmarks" from Gazelle-based sites.
29
131
- **Plex Integration**: Compare the torrent group info with your Plex music library to create or update Plex collections.
30
132
- **Flexible Album Matching**: Match albums in Plex using either the original `torrent_name` (directory name) or a query-based approach (`Artist/Album`), ideal for organized libraries (e.g., Beets/Lidarr).
31
133
- **Incremental Updating**: Update previously created collections as new albums become available or site data changes.
32
134
33
135
## Features
34
136
35
-
-**Multi-Site**: Works with Redacted (“red”) and Orpheus Network (“ops”).
137
+
- **Multi-Site**: Works with Redacted ("red") and Orpheus Network ("ops").
36
138
- **Collections from Collages/Bookmarks**: Create or update entire Plex collections for each collage or bookmarked set.
37
139
- **Local SQLite Database**: All data (albums, collages, bookmarks) is kept in one DB, no more CSV.
38
140
- **Two Fetch Modes**: Choose between `torrent_name` (default) for direct path matching or `query` for metadata-based searches in Plex.
@@ -41,20 +143,6 @@ red-plex is a command-line tool for creating and updating Plex collections based
41
143
- **Simple CLI**: All major tasks are accessed via subcommands like `collages`, `bookmarks`, `db`, etc.
42
144
- **Python 3.8+ Compatible**: Runs on modern Python versions with no external database dependencies.
43
145
44
-
## Installation
45
-
46
-
Install via pip:
47
-
48
-
```bash
49
-
pip install red-plex
50
-
```
51
-
52
-
Or use pipx for an isolated environment:
53
-
54
-
```bash
55
-
pipx install red-plex
56
-
```
57
-
58
146
## Usage & Commands
59
147
60
148
Type `red-plex --help` for detailed usage. Below is a summary of the main commands.
@@ -76,7 +164,7 @@ red-plex config reset
76
164
77
165
```bash
78
166
# Create Plex collections for specific collage IDs
The `--fetch-mode` (or `-fm`) option controls how red-plex locates albums in Plex:
98
186
99
-
-**torrent_name** (default): Searches for directories matching the torrent folder name.
100
-
-**query**: Searches using `Artist` and `Album` metadata, ideal for organized libraries managed by tools like Beets or Lidarr.
187
+
#### For `collages convert`:
188
+
- **torrent_name** (default): Searches for directories matching the torrent folder name
189
+
- **query**: Searches using `Artist` and `Album` metadata, ideal for organized libraries managed by tools like Beets or Lidarr
190
+
191
+
#### For other commands (`collages update`, `bookmarks convert`, `bookmarks update`):
192
+
- **torrent_name** (default): Searches for directories matching the torrent folder name
193
+
- **query**: Searches using `Artist` and `Album` metadata, ideal for organized libraries managed by tools like Beets or Lidarr
101
194
102
-
This option applies to `collages convert`, `collages update`, `bookmarks convert`, and `bookmarks update`. Defaults to `torrent_name` if omitted.
195
+
> **Note**: There's a terminology difference between commands - `collages convert` uses "normal" while other commands use "torrent_name", but both refer to the same functionality.
103
196
104
197
### Database Commands
105
198
@@ -149,13 +242,33 @@ red-plex db albums update
149
242
### Using Query Fetch Mode
150
243
151
244
```bash
152
-
# Create a collection using query mode
245
+
# Create a collection using query mode (for Beets/Lidarr organized libraries)
153
246
red-plex collages convert 12345 --site red --fetch-mode query
154
247
155
248
# Update all bookmarks using query mode
156
249
red-plex bookmarks update --site ops -fm query
157
250
```
158
251
252
+
### Complete Workflow Example
253
+
254
+
```bash
255
+
# 1. First time setup
256
+
red-plex config edit # Add your API keys and Plex details
257
+
258
+
# 2. Update your local album database from Plex
259
+
red-plex db albums update
260
+
261
+
# 3. Create collections from specific collages
262
+
red-plex collages convert 12345 67890 --site red
263
+
264
+
# 4. Create collection from your bookmarks
265
+
red-plex bookmarks convert --site red
266
+
267
+
# 5. Later, update all collections with new releases
268
+
red-plex collages update
269
+
red-plex bookmarks update
270
+
```
271
+
159
272
## Configuration Details
160
273
161
274
By default, configuration is stored in `~/.config/red-plex/config.yml`:
- Look for the `<Device>` node in the XML for a `uri`, use this `plex.direct` address.
302
+
- Use `DEBUG` log level for verbose debugging information
303
+
- Use `WARNING` log level for minimal output
304
+
305
+
## Troubleshooting
306
+
307
+
### Common Issues
308
+
309
+
#### "No module named 'plexapi'" Error
310
+
```bash
311
+
pip install plexapi
312
+
# or
313
+
pip install red-plex --upgrade
314
+
```
315
+
316
+
#### Authentication Errors
317
+
- Verify your API keys are correct in `config.yml`
318
+
- Check that your Plex token is valid
319
+
- Ensure you have access to the sites you're trying to use
320
+
321
+
#### No Albums Found
322
+
- Run `red-plex db albums update` to refresh your Plex library
323
+
- Check that your Plex music library is properly configured
324
+
- Verify the `SECTION_NAME` in your config matches your Plex music library name
325
+
326
+
#### Rate Limiting Issues
327
+
- The tool respects site rate limits automatically
328
+
- If you encounter issues, try reducing the rate limit values in your config
189
329
190
-
## Considerations
330
+
#### Fetch Mode Issues
331
+
- Use `torrent_name`/`normal` mode if your library structure matches torrent folder names
332
+
- Use `query` mode if you use Beets, Lidarr, or have renamed your music files
333
+
- Try both modes to see which works better for your library
334
+
335
+
### Getting Help
336
+
337
+
1. Check the logs with `LOG_LEVEL: DEBUG` in your config
338
+
2. Verify your configuration with `red-plex config show`
339
+
3. Test your Plex connection by running `red-plex db albums update`
340
+
4. Open an issue on GitHub with detailed error messages
341
+
342
+
## Important Considerations
343
+
344
+
- **Album Matching Strategy**:
345
+
- `torrent_name`/`normal` (default): Matches albums by comparing torrent folder names with Plex directory paths
346
+
- `query`: Uses artist and album metadata for matching, ideal for libraries organized by Beets, Lidarr, or other tools that rename files
347
+
- **Database Management**: All data is stored in `red_plex.db`. Use database reset commands (`db albums reset`, etc.) to clear specific tables when needed
348
+
- **Site Credentials**: Ensure your API keys are valid and have proper permissions
349
+
- **Rate Limiting**: The tool automatically respects site-specific rate limits to avoid being banned
350
+
- **Logging Levels**:
351
+
- `DEBUG`: Verbose output for troubleshooting
352
+
- `INFO`: Standard information (default)
353
+
- `WARNING`: Minimal output
354
+
- **Collection Updates**: When you run `collages update` or `bookmarks update`, new albums are added to existing Plex collections, but removed items from tracker collages are not automatically removed from Plex collections
355
+
356
+
## Contributing
357
+
358
+
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
-`query`: Uses metadata for reliable matching in renamed libraries.
195
-
-**Database**: All data in `red_plex.db`. Reset tables with `db albums reset`, etc.
196
-
-**Site Credentials**: Ensure valid API keys in `config.yml`.
197
-
-**Rate Limits**: Adheres to site-specific settings.
198
-
-**Logging**: Use `DEBUG` for verbose logs or `WARNING` for less output.
199
-
-**Updates**: `collages update` and `bookmarks update` add new albums but do not remove existing items in Plex.
370
+
**Disclaimer**: This tool is for personal use with your own music library and tracker accounts. Respect the rules and terms of service of the private trackers you use.
0 commit comments