08_FAQ - nzbgetcom/Extension-RemoveSamples GitHub Wiki

Frequently Asked Questions (FAQ)

Quick answers to the most common questions about RemoveSamples-NZBGet.

🛡️ Safety & Security

Will RemoveSamples delete my actual movies/TV shows/music?

No, RemoveSamples is designed to be very safe. It only removes files that:

  1. Match sample patterns (contain "sample" in filename)
  2. AND are below size thresholds (default: 150MB for video, 2MB for audio)

Your actual media files are typically much larger and don't contain sample patterns in their names.

Example of what's safe:

  • Movie.Name.2023.1080p.mkv (8.5 GB) - SAFE (too large, no sample pattern)
  • soundtrack.mp3 (4.8 MB) - SAFE (no sample pattern, above audio threshold)
  • Movie.Name.2023.sample.mkv (45 MB) - REMOVED (sample pattern + below threshold)

Can I undo if RemoveSamples removes something important?

Recovery options depend on your setup:

If using media managers (Sonarr/Radarr/Lidarr):

  • Original download usually preserved until import completes
  • Re-download option available in media manager
  • Recycle bin may contain deleted files (OS dependent)

Prevention is better:

  • Start with conservative settings (higher thresholds)
  • Enable debug mode initially to see what would be removed
  • Test with non-critical downloads first

Is my system secure with RemoveSamples installed?

Yes, RemoveSamples follows security best practices:

  • Regular security scanning with CodeQL
  • Dependency vulnerability monitoring with Dependabot
  • No network access - only local file operations
  • Minimal permissions - only file system access needed
  • Open source - code is publicly auditable

⚙️ Configuration & Setup

How do I know if RemoveSamples is working?

Check these indicators:

1. Enable debug mode temporarily:

Settings → Extension Manager → RemoveSamples → Debug: Yes

2. Process a test download and check logs:

Settings → Logging → Messages

3. Look for log entries like:

[INFO] RemoveSamples: Processing directory: /downloads/Movie.Name.2023/
[INFO] RemoveSamples: Removed sample file: sample.mkv (45 MB)
[INFO] RemoveSamples: Processing completed - removed 2 items

4. Verify sample files are gone from completed downloads

What are the best settings for beginners?

Recommended starter configuration:

Remove Directories: Yes
Remove Files: Yes
Debug: Yes (initially)
Video Size Threshold: 200 MB (conservative)
Audio Size Threshold: 5 MB (conservative)

After you're comfortable:

Debug: No
Video Size Threshold: 150 MB
Audio Size Threshold: 2 MB

Do I need different settings for 4K movies?

Yes, 4K content often has larger samples:

Video Size Threshold: 300-500 MB (instead of 150 MB)
Audio Size Threshold: 5 MB (instead of 2 MB)

Why larger thresholds for 4K:

  • 4K sample clips can be 200-400 MB
  • Higher quality audio samples in 4K releases
  • More conservative approach prevents false positives

🔄 Integration & Workflow

Where should RemoveSamples run in my script order?

Recommended order:

1. PasswordDetector (if used)
2. FakeDetector (if used)
3. RemoveSamples ← Your extension
4. Clean (if used)
5. Other scripts

Key principle: RemoveSamples should run after unpack but before media managers process the files.

Can I use RemoveSamples with Sonarr/Radarr/Lidarr?

Absolutely! RemoveSamples works great with all media managers:

Benefits:

  • Cleaner imports - no sample files in your library
  • Faster processing - fewer files for media managers to scan
  • Reduced false detections - eliminates sample files that might confuse media managers

Setup:

  1. Add RemoveSamples to your NZBGet categories
  2. Ensure it runs before media manager processing
  3. Use appropriate thresholds for your content quality

Do I need separate configurations for different categories?

Not necessarily, but it can be helpful:

Single configuration works for most users:

movies, tv, music → Same RemoveSamples settings

Advanced users might want category-specific settings:

movies-4k → Higher thresholds (300MB video)
tv-standard → Standard thresholds (150MB video)
music → Lower audio threshold (1MB audio)

🔍 Detection & Patterns

What types of files does RemoveSamples detect?

File pattern detection:

  • sample.mkv, movie.sample.mp4
  • preview_sample.avi, sample_video.wmv
  • Files with .sample., _sample., -sample. patterns

Directory pattern detection:

  • samples/, SAMPLE/, Sample Videos/
  • Any directory with "sample" or "samples" in the name

Size-based detection:

  • Video files below threshold (default 150MB)
  • Audio files below threshold (default 2MB)
  • Only applies to files with recognized extensions

Why wasn't my sample file removed?

Common reasons:

1. File too large:

sample_4k.mkv (250 MB) > 150 MB threshold

Solution: Increase video threshold or check if it's actually a sample

2. No pattern match:

preview.mkv - doesn't contain "sample"

Solution: Size-based detection only, or adjust patterns if needed

3. Not a recognized format:

sample.unknown - extension not in video/audio lists

Solution: Add extension to Video/Audio Extensions list

4. Debug logs show detection: Enable debug mode to see exactly why files are/aren't removed.

Can I add custom sample patterns?

Currently, RemoveSamples uses built-in patterns:

  • Word boundary matching for "sample"
  • Various separator patterns (., _, -)
  • Directory name matching

For custom needs:

  • Adjust size thresholds to catch more files
  • Request custom patterns via GitHub Issues
  • Future versions may include configurable patterns

🐛 Troubleshooting

RemoveSamples isn't appearing in Extension Manager

Check these common issues:

1. File permissions:

chmod 755 main.py
chmod 644 manifest.json

2. File location:

/scripts/RemoveSamples/
├── main.py
└── manifest.json

3. NZBGet restart:

  • Restart NZBGet completely after installation

4. Python installation:

python3 --version  # Should show 3.8+

Downloads hang in post-processing

Possible causes and solutions:

1. Script timeout:

Settings → Extension Scripts → Script Timeout
Increase from 10 to 20-30 minutes

2. Large download directories:

# Increase thresholds to reduce processing
Video Size Threshold: 500 MB
Audio Size Threshold: 10 MB

3. Permission issues:

# Check file permissions
ls -la /downloads/directory/

4. Python errors: Enable debug mode and check logs for Python-related errors.

Extension runs but nothing gets removed

Diagnostic steps:

1. Enable debug mode:

Debug: Yes

2. Check logs for processing:

[DEBUG] RemoveSamples: Checking file: sample.mkv
[DEBUG] RemoveSamples: Pattern match: found
[DEBUG] RemoveSamples: Size check: 45MB < 150MB
[INFO] RemoveSamples: Removing sample file: sample.mkv

3. Verify configuration:

  • Remove Files: Yes
  • Remove Directories: Yes
  • Appropriate thresholds for your content

4. Test with obvious samples: Download content with clear sample files to test detection.

🐳 Docker & Unraid

Does RemoveSamples work with Docker containers?

Yes! RemoveSamples works perfectly with Docker NZBGet containers.

Popular working containers:

  • linuxserver/nzbget (most popular, Python included)
  • nzbget/nzbget (official, may need Python installation)
  • Unraid NZBGet (Community Applications version)

Key requirements:

  • Python 3.8+ in container (usually included)
  • Proper volume mounting for scripts directory
  • Correct file permissions (varies by container)

How do I install RemoveSamples on Unraid?

Recommended method for Unraid:

1. Access NZBGet appdata directory:

cd /mnt/user/appdata/nzbget/scripts/
mkdir -p RemoveSamples

2. Download extension files:

wget -O RemoveSamples/main.py https://github.com/Anunnaki-Astronaut/RemoveSamples-NZBGet/raw/main/main.py
wget -O RemoveSamples/manifest.json https://github.com/Anunnaki-Astronaut/RemoveSamples-NZBGet/raw/main/manifest.json

3. Set Unraid permissions:

chown -R nobody:users RemoveSamples/
chmod 755 RemoveSamples/main.py

4. Restart NZBGet container via Unraid Docker tab

What are the correct paths for Unraid?

Typical Unraid NZBGet paths:

Host Appdata: /mnt/user/appdata/nzbget/
Host Scripts: /mnt/user/appdata/nzbget/scripts/
Host Downloads: /mnt/user/downloads/nzbget/

Container Config: /config/
Container Scripts: /opt/nzbget/scripts/  
Container Downloads: /downloads/

RemoveSamples installation location:

Host: /mnt/user/appdata/nzbget/scripts/RemoveSamples/
Container: /opt/nzbget/scripts/RemoveSamples/

Why do I get permission errors in Docker?

Common permission issues and fixes:

Unraid (nobody:users):

chown -R nobody:users /mnt/user/appdata/nzbget/scripts/RemoveSamples/

Standard Docker (1000:1000):

chown -R 1000:1000 /path/to/scripts/RemoveSamples/

LinuxServer containers (abc user):

chown -R abc:abc /path/to/scripts/RemoveSamples/

Always set executable permissions:

chmod 755 RemoveSamples/main.py

How do I update RemoveSamples?

Via Extension Manager (when available):

  1. Settings → Extension Manager
  2. Check for updates
  3. Click update if available

Manual update:

  1. Download latest release from GitHub
  2. Replace files in scripts directory
  3. Restart NZBGet

Check current version:

Settings → Extension Manager → RemoveSamples
Version shown in extension details

Will updates change my configuration?

No, your settings are preserved during updates:

  • Configuration stored in NZBGet settings
  • Extension files can be updated safely
  • Settings remain until manually changed

How do I completely remove RemoveSamples?

1. Disable in categories:

Settings → Categories → [Category] → ExtensionScripts
Remove RemoveSamples from the list

2. Delete extension files:

rm -rf /path/to/nzbget/scripts/RemoveSamples/

3. Restart NZBGet: Extension will no longer appear in Extension Manager

🆚 Comparison with Other Solutions

How is this different from DeleteSamples.py?

Key improvements:

  • Modern extension format vs legacy script
  • GUI configuration vs manual file editing
  • Directory removal vs files only
  • Advanced pattern matching vs basic detection
  • Active development vs abandoned (6+ years)
  • Comprehensive testing vs no tests

See detailed comparison: vs DeleteSamples.py

Should I replace my existing sample removal script?

Yes, if you're using:

  • DeleteSamples.py (outdated, unmaintained)
  • Custom bash/shell scripts (limited functionality)
  • Manual sample removal (time-consuming)

Migration is simple:

  1. Disable old script in categories
  2. Install RemoveSamples
  3. Configure via GUI
  4. Test with non-critical downloads

📞 Support & Community

Where can I get help?

GitHub Issues (Bug reports, feature requests): https://github.com/Anunnaki-Astronaut/RemoveSamples-NZBGet/issues

GitHub Discussions (General questions, configuration help): https://github.com/Anunnaki-Astronaut/RemoveSamples-NZBGet/discussions

Security Issues (Vulnerabilities, sensitive bugs): [email protected]

How can I contribute?

Ways to help:

  • Report bugs with detailed information
  • Suggest features via GitHub Issues
  • Share configurations that work well
  • Help other users in GitHub Discussions
  • Improve documentation via pull requests

Is RemoveSamples officially supported by NZBGet?

Current status:

  • Submitted to NZBGet team for official inclusion
  • Follows NZBGet extension standards
  • Compatible with NZBGet 14.0+
  • 🕐 Pending review for official extension repository

Even without official status:

  • Fully functional with all NZBGet versions
  • Professional development practices
  • Active community support

Still have questions?GitHub Discussions
Found a bug?GitHub Issues
Need configuration help?Configuration Reference