2025-03-04 22:28:11 +00:00

374 lines
11 KiB
Markdown
Executable File

# Transmission RSS Manager
A comprehensive web-based tool to automate and manage your Transmission torrent downloads with RSS feed integration, intelligent media organization, and enhanced security features.
## Features
- 🔄 **RSS Feed Integration**: Automatically download torrents from RSS feeds with customizable filters
- 📊 **Torrent Management**: Monitor and control your Transmission torrents from a clean web interface
- 📚 **Intelligent Media Organization**: Automatically categorize and organize downloads by media type
- 📖 **Book & Magazine Sorting**: Specialized processing for e-books and magazines with metadata extraction
- 📂 **Post-Processing**: Extract archives, rename files, and move content to appropriate directories
- 🔄 **Remote Support**: Connect to remote Transmission instances with local path mapping
- 🔒 **Enhanced Security**: Authentication, HTTPS support, and secure password storage
- 📱 **Mobile-Friendly UI**: Responsive design works on desktop and mobile devices
## Installation
### Prerequisites
- Ubuntu/Debian-based system (may work on other Linux distributions)
- Node.js 14+ and npm
- Transmission daemon installed and running
- Nginx (for reverse proxy, optional)
### System Requirements
- Memory: 512MB minimum, 1GB recommended
- CPU: Any modern processor (1GHz+)
- Disk: At least 200MB for the application, plus storage space for your media
- Network: Internet connection for RSS feed fetching and torrent downloading
### Automatic Installation
The easiest way to install Transmission RSS Manager is with the installation script:
```bash
# Download the installation script
wget https://raw.githubusercontent.com/username/transmission-rss-manager/main/install.sh
# Make it executable
chmod +x install.sh
# Run it with sudo
sudo ./install.sh
```
The script will guide you through the configuration process and set up everything you need.
### Manual Installation
If you prefer to install manually:
1. Clone the repository:
```bash
git clone https://github.com/username/transmission-rss-manager.git
cd transmission-rss-manager
```
2. Install dependencies:
```bash
npm install
```
3. Configure settings:
```bash
cp config.example.json config.json
nano config.json
```
4. Start the server:
```bash
# Using the convenience script (recommended)
./scripts/test-and-start.sh
# Or start with debug logging
./scripts/test-and-start.sh --debug
# Or run in foreground mode
./scripts/test-and-start.sh --foreground
# Or start directly
node server.js
```
## Configuration
### Main Configuration Options
The system can be configured through the web interface or by editing the `config.json` file:
```json
{
"transmissionConfig": {
"host": "localhost",
"port": 9091,
"username": "transmission",
"password": "password",
"path": "/transmission/rpc"
},
"destinationPaths": {
"movies": "/mnt/media/movies",
"tvShows": "/mnt/media/tvshows",
"music": "/mnt/media/music",
"books": "/mnt/media/books",
"magazines": "/mnt/media/magazines",
"software": "/mnt/media/software"
},
"processingOptions": {
"enableBookSorting": true,
"extractArchives": true,
"renameFiles": true,
"ignoreSample": true
}
}
```
### Remote Transmission Setup
For remote Transmission instances, configure the directory mapping:
```json
"remoteConfig": {
"isRemote": true,
"directoryMapping": {
"/var/lib/transmission-daemon/downloads": "/mnt/transmission-downloads"
}
}
```
This maps paths between your remote Transmission server and the local directories.
## Usage
### Web Interface
The web interface provides access to all functionality and is available at:
```
http://your-server-ip
```
### RSS Feed Management
1. Go to the "RSS Feeds" tab in the web interface
2. Click "Add Feed" and enter the RSS feed URL
3. Configure optional filters for automatic downloads
4. The system will periodically check feeds and download matching items
### Managing Torrents
From the "Torrents" tab, you can:
- Add new torrents via URL or magnet link
- Start, stop, or delete existing torrents
- Monitor download progress and stats
### Media Organization
The post-processor automatically:
1. Waits for torrents to complete and meet seeding requirements
2. Identifies the media type based on content analysis
3. Extracts archives if needed
4. Moves files to the appropriate category directory
5. Renames files according to media type conventions
6. Updates the media library for browsing
### Book & Magazine Sorting
When enabled, the system can:
- Differentiate between books and magazines
- Extract author information from book filenames
- Organize magazines by title and issue number
- Create appropriate folder structures
## Detailed Features
### Automatic Media Detection and Processing
The system uses sophisticated detection to categorize downloads:
- **Movies**: Recognizes common patterns such as resolution (1080p, 720p) and release year
- **TV Shows**: Identifies season/episode patterns (S01E01) and TV-specific naming
- **Music**: Detects audio formats like MP3, FLAC, album folders
- **Books**: Identifies e-book formats (EPUB, MOBI, PDF) and author-title patterns
- **Magazines**: Recognizes magazine naming patterns, issues, volumes, and publication dates
- **Software**: Detects software installers, ISOs, and other program files
### Enhanced Post-Processing
The post-processor automatically processes completed torrents that have met seeding requirements:
- **Smart File Categorization**: Automatically detects media type based on content analysis
- **Intelligent Folder Organization**: Creates category-specific directories and file structures
- **Archive Extraction**: Automatically extracts compressed files (.zip, .rar, .7z, etc.)
- **File Renaming**: Cleans up filenames by removing dots, underscores, and other unwanted characters
- **Quality Management**: Optionally replace existing files with better quality versions
- **Seeding Requirements**: Configurable minimum ratio and seeding time before processing
### Robust Transmission Integration
The improved Transmission client integration provides:
- **Enhanced Error Handling**: Automatic retry on connection failures
- **Media Information**: Deep analysis of torrent content for better categorization
- **Remote Support**: Comprehensive path mapping between remote and local systems
- **Torrent Management**: Complete control over torrents (add, start, stop, remove)
- **Performance Monitoring**: Track download/upload speeds and other performance metrics
### RSS Feed Filtering
Powerful filtering options for RSS feeds:
- **Title matching**: Regular expression support for title patterns
- **Category filtering**: Filter by feed categories
- **Size limits**: Set minimum and maximum size requirements
- **Custom rules**: Combine multiple criteria for precise matching
### Remote Transmission Support
Full support for remote Transmission instances:
- **Secure authentication**: Username/password protection
- **Path mapping**: Configure how remote paths map to local directories
- **Full API support**: Complete control via the web interface
## Updating
To update to the latest version:
### Using the Built-in Update Script
If you've already installed Transmission RSS Manager, you can use the built-in update script:
```bash
cd /opt/transmission-rss-manager
sudo scripts/update.sh
```
Use the `--force` flag to force an update of dependencies even if no code changes are detected:
```bash
sudo scripts/update.sh --force
```
### Manual Update
Alternatively, you can download and run the update script:
```bash
wget https://raw.githubusercontent.com/username/transmission-rss-manager/main/scripts/update.sh
chmod +x update.sh
sudo ./update.sh
```
## File Structure
```
transmission-rss-manager/
├── server.js # Main application server
├── modules/ # Modular components
│ ├── post-processor.js # Media processing module
│ ├── rss-feed-manager.js # RSS feed management module
│ ├── transmission-client.js # Transmission API integration
│ └── config-module.sh # Installation configuration
├── install-script.sh # Initial installer that creates modules
├── main-installer.sh # Main installation script
├── config.json # Configuration file
├── public/ # Web interface files
│ ├── index.html # Main web interface
│ ├── js/ # JavaScript files
│ │ ├── app.js # Core application logic
│ │ └── utils.js # Utility functions
│ └── css/ # CSS stylesheets
│ └── styles.css # Main stylesheet
└── README.md # This file
```
## Modules
### Post-Processor
The Post-Processor module handles:
- Monitoring completed torrents
- Categorizing content by type
- Extracting archives
- Organizing files into the correct directories
- Renaming files according to conventions
### RSS Feed Manager
The RSS Feed Manager module provides:
- Regular checking of configured RSS feeds
- Filtering of feed items based on rules
- Automated downloading of matching content
- History tracking of downloaded items
## Advanced Configuration
### Seeding Requirements
Set minimum seeding requirements before processing:
```json
"seedingRequirements": {
"minRatio": 1.0,
"minTimeMinutes": 60,
"checkIntervalSeconds": 300
}
```
### Security Settings
Enable authentication and HTTPS for secure access:
```json
"securitySettings": {
"authEnabled": true,
"httpsEnabled": true,
"sslCertPath": "/path/to/ssl/cert.pem",
"sslKeyPath": "/path/to/ssl/key.pem",
"users": [
{
"username": "admin",
"password": "your-hashed-password",
"role": "admin"
},
{
"username": "user",
"password": "your-hashed-password",
"role": "user"
}
]
}
```
*Note: Passwords are automatically hashed on first login if provided in plain text.*
### Processing Options
Customize how files are processed:
```json
"processingOptions": {
"enableBookSorting": true,
"extractArchives": true,
"deleteArchives": true,
"createCategoryFolders": true,
"ignoreSample": true,
"ignoreExtras": true,
"renameFiles": true,
"autoReplaceUpgrades": true,
"removeDuplicates": true,
"keepOnlyBestVersion": true
}
```
## Contributing
Contributions are welcome! Here's how you can help:
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
This project is licensed under the MIT License.
## Acknowledgments
- [Transmission](https://transmissionbt.com/) for the excellent BitTorrent client
- [Node.js](https://nodejs.org/) and the npm community for the foundation libraries
- All contributors who have helped improve this project