Modern NZBGet extension for intelligent sample file detection and removal. Automatically cleans sample files and directories before Sonarr/Radarr/Lidarr/Prowlarr processing.
π Replaces the legacy DeleteSamples.py script with modern extension format and advanced detection algorithms.
π Complete Documentation | π Installation Guide | βοΈ Configuration Reference
- π― Smart Detection: Advanced pattern matching with word boundary detection
- π Directory Cleanup: Removes entire sample directories (
samples/
,SAMPLE/
) - π¬ Video Support: Configurable size thresholds for different quality levels
- π΅ Audio Support: Separate detection logic for audio samples
- βοΈ Modern Interface: GUI dropdown configuration (no file editing!)
- π³ Docker Ready: Works with all popular NZBGet Docker containers
- π§ Flexible: Independent control over file and directory removal
- π‘οΈ Enterprise-Grade: Automated security scanning and dependency monitoring
vs DeleteSamples.py (Legacy Script)
Feature | DeleteSamples.py | RemoveSamples |
---|---|---|
Configuration | β Manual file editing | β Modern dropdown interface |
Directory Removal | β Files only | β Files AND directories |
Extension Format | β Legacy script | β Modern NZBGet extension |
Pattern Detection | β Basic substring | β Advanced pattern matching |
Audio Support | β Limited | β Full configurable support |
Maintenance | β Abandoned (6+ years) | β Active development |
- Open NZBGet web interface
- Go to Settings β Extension Manager
- Find "RemoveSamples" in the list
- Click Install
# Download and extract to NZBGet scripts directory
mkdir -p /path/to/nzbget/scripts/RemoveSamples/
# Copy main.py and manifest.json
chmod 755 main.py && chmod 644 manifest.json
# For Unraid NZBGet containers
cd /mnt/user/appdata/nzbget/scripts/
mkdir -p RemoveSamples
# Download files and set permissions for nobody:users
π Detailed installation instructions for all platforms β
Remove Directories: Yes # Delete sample directories
Remove Files: Yes # Delete sample files
Debug: No # Enable for troubleshooting
Video Size Threshold: 150 MB # 720p: 50MB, 1080p: 100MB, 4K: 300MB+
Audio Size Threshold: 2 MB # ~30 seconds of 320kbps MP3
Conservative (New Users)
Video: 300 MB | Audio: 5 MB | Debug: Yes
Balanced (Most Users)
Video: 150 MB | Audio: 2 MB | Debug: No
Aggressive (High Volume)
Video: 50 MB | Audio: 1 MB | Debug: No
π Complete configuration guide β
1. PasswordDetector (if used)
2. FakeDetector (if used)
3. RemoveSamples β Place here
4. Clean (if used)
5. Other scripts
- Sonarr: Cleaner TV episode imports, no sample episodes
- Radarr: No trailer/sample files in movie folders
- Lidarr: No 30-second preview tracks in albums
- Prowlarr: Consistent cleanup across all content types
π Complete workflow integration guide β
Movie.Name.2023.sample.mkv # Pattern + size match
sample.mp4 # Clear sample file
preview_sample.avi # Sample pattern
samples/ # Sample directory
Small.video.under.150MB.mkv # Size-based detection
Movie.Name.2023.1080p.mkv # Normal size, no pattern
soundtrack.mp3 # No sample pattern
behind-the-scenes.mp4 # Above size threshold
Movie.Title.SAMPLE.2023.mkv # If "SAMPLE" in original title
- Word boundary detection:
\bsample\b
prevents false positives - Multiple separators:
.sample.
,_sample.
,-sample.
- Directory patterns: Comprehensive sample directory detection
- Separate thresholds for video/audio files
- Configurable extensions for each media type
- Smart combination of pattern and size detection
π Complete detection logic documentation β
Fully compatible with popular Docker containers:
- β
linuxserver/nzbget
(Recommended) - β
nzbget/nzbget
(Official) - β Unraid Community Applications NZBGet
- β Custom Docker Compose setups
Container-specific installation guides available in documentation.
# Enable debug mode
Settings β Extension Manager β RemoveSamples β Debug: Yes
# Check logs
Settings β Logging β Messages
# Verify installation
ls -la /path/to/scripts/RemoveSamples/
# Should show: main.py (executable) and manifest.json
- Extension not appearing: Check file permissions and restart NZBGet
- Files not removed: Verify thresholds and enable debug mode
- Docker permissions: Use container-appropriate user/group
π Complete troubleshooting guide β
- π Complete Wiki: Comprehensive Documentation
- π Bug Reports: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Security Issues: anunnaki.astronaut@machinamindmeld.com
- β FAQ: Frequently Asked Questions
RemoveSamples is built with enterprise-grade practices:
- Automated security scanning with CodeQL
- Dependency vulnerability monitoring with Dependabot
- Comprehensive test coverage with automated CI/CD
- Professional code review workflow
π RemoveSamples is now officially available in the NZBGet Extension Manager!
RemoveSamples has been accepted by the NZBGet team and is available for one-click installation through the official Extension Manager.
- NZBGet: Version 14.0 or later (21.0+ recommended)
- Python: 3.8+ installed on your system
- Permissions: Execute permission on main.py
python -m unittest tests.py -v
pip install prospector
prospector main.py
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes with tests
- Ensure all tests pass:
python -m unittest tests.py -v
- Submit a pull request
π Development documentation β
GNU General Public License v2.0 - see LICENSE file for details.
- β Official NZBGet adoption - Available in Extension Manager
- β Modern NZBGet extension format with manifest.json
- β GUI dropdown configuration interface
- β Advanced pattern matching with word boundaries
- β Comprehensive sample detection (files + directories)
- β Configurable video/audio size thresholds
- β Full test coverage with automated CI/CD
- β Docker and Unraid compatibility
- β Enterprise-grade security practices
- β Complete documentation wiki
Ready to get started? β Installation Guide
Need help? β FAQ | Troubleshooting