Sign inSign up

chryses/emulerr-stalled-checker

By chryses

•Updated 5 months ago

Automated monitor for stalled eD2k/KAD in Sonarr/Radarr. Check, report, remove, notify

Image
0

3.8K

chryses/emulerr-stalled-checker repository overview

# eMulerr Stalled Checker

Automated monitoring and cleanup tool for stalled ed2k/Kad downloads in Sonarr/Radarr via eMulerr.

## 🚀 Quick Start

```bash
docker run -d \
  --name emulerr-stalled-checker \
  --restart unless-stopped \
  -e CHECK_INTERVAL=10 \
  -e EMULERR_HOST=http://your-emulerr:3000 \
  -e STALL_CHECKS=30 \
  -e STALL_DAYS=20 \
  -e DOWNLOAD_CLIENT=emulerr \
  -e RADARR_HOST=http://your-radarr:7878 \
  -e RADARR_API_KEY=your_api_key \
  -e RADARR_CATEGORY=radarr-eMulerr \
  -e SONARR_HOST=http://your-sonarr:8989 \
  -e SONARR_API_KEY=your_api_key \
  -e SONARR_CATEGORY=tv-sonarr-eMulerr \
  chryses/emulerr-stalled-checker:latest

⁠📖 What It Does

This Docker container monitors eMulerr⁠ downloads added by Sonarr/Radarr and automatically:

  • ✅ Detects stalled downloads (no progress, no sources)
  • ✅ Removes them from eMulerr after configurable checks
  • ✅ Marks them as failed in Sonarr/Radarr
  • ✅ Triggers automatic search for alternative sources
  • ✅ Cleans up orphaned downloads
  • ✅ Respects monitoring status
  • ✅ Sends Pushover notifications

⁠⚙️ Key Configuration

⁠Required Variables
VariableDescriptionExample
EMULERR_HOSTeMulerr URLhttp://10.0.0.100:3000
CHECK_INTERVALMinutes between checks10
STALL_CHECKSChecks before marking stalled30
STALL_DAYSDays for incomplete downloads20
DOWNLOAD_CLIENTDownload client name in *Arremulerr
⁠Sonarr Configuration (Optional)
-e SONARR_HOST=http://your-sonarr:8989
-e SONARR_API_KEY=your_api_key
-e SONARR_CATEGORY=tv-sonarr-eMulerr
⁠Radarr Configuration (Optional)
-e RADARR_HOST=http://your-radarr:7878
-e RADARR_API_KEY=your_api_key
-e RADARR_CATEGORY=radarr-eMulerr

Note: Configure at least one *Arr service (Sonarr or Radarr)

⁠Optional Features
-e DELETE_IF_UNMONITORED_EPISODE=true    # Remove unmonitored episodes
-e DELETE_IF_UNMONITORED_MOVIE=true      # Remove unmonitored movies
-e DELETE_IF_ONLY_ON_EMULERR=true        # Remove orphaned downloads
-e RECENT_DOWNLOAD_GRACE_PERIOD=30       # Minutes to wait for new downloads
-e PUSHOVER_USER_KEY=your_key            # Pushover notifications
-e PUSHOVER_APP_TOKEN=your_token
-e LOG_LEVEL=info                        # Logging: debug|info|warning|error
-e DRY_RUN=false                         # Test mode without deletions

⁠🐳 Docker Compose Example

version: '3.8'

services:
  emulerr-stalled-checker:
    image: chryses/emulerr-stalled-checker:latest
    container_name: emulerr-stalled-checker
    restart: unless-stopped
    environment:
      - TZ=Europe/Rome
      - CHECK_INTERVAL=10
      - EMULERR_HOST=http://10.0.0.100:3000
      - STALL_CHECKS=30
      - STALL_DAYS=20
      - RECENT_DOWNLOAD_GRACE_PERIOD=30
      - DELETE_IF_UNMONITORED_EPISODE=true
      - DELETE_IF_UNMONITORED_MOVIE=true
      - DELETE_IF_ONLY_ON_EMULERR=false
      - LOG_LEVEL=info
      - DRY_RUN=false
      - DOWNLOAD_CLIENT=emulerr
      - RADARR_HOST=http://10.0.0.100:7878
      - RADARR_API_KEY=your_radarr_api_key
      - RADARR_CATEGORY=radarr-eMulerr
      - SONARR_HOST=http://10.0.0.100:8989
      - SONARR_API_KEY=your_sonarr_api_key
      - SONARR_CATEGORY=tv-sonarr-eMulerr

⁠📊 How It Works

  1. Monitors eMulerr downloads at regular intervals
  2. Detects stalled downloads based on configurable criteria
  3. Verifies monitoring status in Sonarr/Radarr
  4. Removes qualifying downloads from eMulerr
  5. Marks as failed in corresponding *Arr application
  6. Triggers automatic search for alternatives
  7. Notifies via Pushover (optional)

⁠🔍 Stall Detection

A download is considered stalled when:

  • No progress for STALL_CHECKS consecutive checks
  • No active sources/peers
  • Incomplete and older than STALL_DAYS days
  • Not within RECENT_DOWNLOAD_GRACE_PERIOD (for new downloads)

⁠📱 Pushover Notifications

Get real-time alerts when downloads are removed:

  1. Sign up at pushover.net⁠
  2. Create an application for API token
  3. Configure environment variables:
-e PUSHOVER_USER_KEY=your_user_key
-e PUSHOVER_APP_TOKEN=your_app_token

⁠🐛 Troubleshooting

⁠View Logs
docker logs -f emulerr-stalled-checker
⁠Enable Debug Mode
-e LOG_LEVEL=debug
⁠Test Configuration (Dry Run)
-e DRY_RUN=true
⁠Common Issues

Script doesn't remove downloads:

  • Check DRY_RUN=false
  • Verify STALL_CHECKS threshold reached
  • Ensure downloads outside grace period

Cannot connect to services:

  • Use IP addresses, not localhost
  • Verify services on same network
  • Test URLs: docker exec container wget -O- http://service:port

Category mismatch:

  • Ensure eMulerr categories in *Arr match environment variables exactly (case-sensitive)

⁠🏗️ Supported Architectures

  • ✅ linux/amd64 (x86_64)
  • ✅ linux/arm64 (ARM 64-bit)

⁠📚 Full Documentation

GitHub: Jorman/Scripts/eMulerrStalledChecker⁠

Detailed README with advanced configurations, examples, and troubleshooting.

⁠📄 License

GNU General Public License v3.0

⁠💬 Support


Built with ❤️ for the Arr community

Auto-built via GitHub Actions | Source: GitHub⁠

Tag summary

Content type

Image

Digest

sha256:4dd2c8dce…

Size

32.1 MB

Last updated

5 months ago

docker pull chryses/emulerr-stalled-checker