Skip to content

devsargam/seedstorm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seedstorm

Torrent download + Cloudflare R2 upload CLI with persistent JSON state and queue event callbacks.

Commands

# Download selected files from a magnet
node dist/cli.js download "magnet:?xt=urn:btih:..."

# Upload selected files from latest job state (or --job <infoHash>)
node dist/cli.js upload --job <infoHash>

# Direct upload fallback from folder
node dist/cli.js upload ./downloads

# Inspect saved state
node dist/cli.js state
node dist/cli.js state --json

# Backfill queue events from existing R2 objects
node dist/cli.js backfill --dry-run
node dist/cli.js backfill
node dist/cli.js backfill --all-keys

State File

  • Path: .seedstorm-state/state.json
  • Tracks per job:
    • selected files
    • download progress/status
    • upload progress/status

R2 Environment

Required:

R2_ACCESS_KEY_ID=...
R2_SECRET_ACCESS_KEY=...
R2_BUCKET=...
R2_ENDPOINT=https://<accountid>.r2.cloudflarestorage.com

Optional:

R2_PREFIX=
R2_CONCURRENCY=6

Queue Events

Worker endpoint defaults to:

  • https://queue-backend.sargam.workers.dev

Sent events:

  • torrent_downloaded (after download completes)
  • hls_generating (when upload starts)
  • hls_uploaded (when upload completes)
  • failed (download/upload failure)

Payload shape:

{
  "id": "job-id",
  "status": "torrent_downloaded|hls_generating|hls_uploaded|failed",
  "torrentKey": "optional",
  "hlsKey": "optional",
  "meta": {}
}

Queue env controls:

QUEUE_BACKEND_URL=https://queue-backend.sargam.workers.dev
QUEUE_EVENTS_ENABLED=true # set false/0/no to disable

About

a hacky torrent client for my needs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors