torrent/etc/torrent/mover.conf
masterdraco f572a241ef Fix torrent processing issues in transmission_handler.sh
- Fix quote handling in transmission-remote commands
- Add robust handling for empty torrent IDs
- Improve path handling for empty directories
- Update version to 9.1 with shared directory handling
- Fix empty array subscript errors

On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   README.md
	modified:   etc/torrent/mover.conf
	modified:   install.sh
	new file:   usr/local/bin/smart-processor
	modified:   usr/local/bin/torrent-mover
	new file:   usr/local/bin/torrent-processor
	modified:   usr/local/lib/torrent-mover/common.sh
	modified:   usr/local/lib/torrent-mover/transmission_handler.sh
2025-03-04 17:15:51 +01:00

72 lines
2.4 KiB
Plaintext

# Transmission credentials
TRANSMISSION_IP="192.168.5.19"
TRANSMISSION_PORT="9091"
TRANSMISSION_USER=""
TRANSMISSION_PASSWORD=""
# Seeding criteria
SEED_RATIO="2.5"
SEED_TIME="2880" # Minutes
# Directory mappings
DIR_GAMES_DST="/mnt/dsnas1/Games"
DIR_APPS_DST="/mnt/dsnas1/Apps"
DIR_MOVIES_DST="/mnt/dsnas1/Movies"
DIR_BOOKS_DST="/mnt/dsnas1/Books"
DIR_TV_DST="/mnt/dsnas1/TV"
DIR_MUSIC_DST="/mnt/dsnas1/Music"
DEFAULT_DST="/mnt/dsnas1/Other"
# Storage directories (comma-separated)
STORAGE_DIRS="/mnt/dsnas/Movies"
STORAGE_TV_DIRS="/mnt/dsnas/TV"
# Path mapping
# This maps the transmission-reported download path to the local filesystem path
# The script will use this prefix to translate paths between Transmission and local filesystem
#
# IMPORTANT: Transmission reports paths as /downloads/Books but they are actually in /mnt/dsnas2/Books
TRANSMISSION_PATH_PREFIX="/downloads"
LOCAL_PATH_PREFIX="/mnt/dsnas2"
# Security settings
# Default user/group for torrent operations (usually debian-transmission)
TORRENT_USER="debian-transmission"
TORRENT_GROUP="debian-transmission"
# Custom pattern matching for content categorization
# Format: "pattern1=destination1;pattern2=destination2"
# Example: ".*\.linux.*=${DIR_LINUX_DST};.*documentary.*=${DIR_DOCUMENTARY_DST}"
CUSTOM_PATTERNS=".*documentary.*=${DIR_MOVIES_DST}/Documentary;.*anime.*=${DIR_TV_DST}/Anime;.*games.*=${DIR_GAMES_DST};.*apps.*=${DIR_APPS_DST};.*books.*=${DIR_BOOKS_DST};.*tv.*=${DIR_TV_DST};.*series.*=${DIR_TV_DST};.*music.*=${DIR_MUSIC_DST}"
# Error recovery settings
MAX_RETRY_ATTEMPTS="3"
RETRY_WAIT_TIME="15"
# Performance settings
PARALLEL_THREADS="32" # Match CPU core count
PARALLEL_PROCESSING=1
# Operation mode
COPY_MODE="copy" # move|copy
PROCESSED_LOG="/var/log/torrent_processed.log"
CHECKSUM_DB="/var/lib/torrent/checksums.db"
# System settings
LOG_FILE="/var/log/torrent_mover.log"
# Logging level: set to "DEBUG" to enable debug messages; otherwise "INFO"
LOG_LEVEL="INFO"
# Set CHECK_TRANSFER_INTEGRITY to "true" to verify copied files after transfer.
CHECK_TRANSFER_INTEGRITY="true"
# Optionally, set USE_SYSLOG="true" to also log messages to syslog.
USE_SYSLOG="false"
# Auto-create directories - commented out from config file
# These should be created in a script, not in the config file
# mkdir -p "${DIR_GAMES_DST}" "${DIR_APPS_DST}" \
# "${DIR_MOVIES_DST}" "${DIR_BOOKS_DST}" \
# "${DIR_TV_DST}" "${DIR_MUSIC_DST}" \
# "${DEFAULT_DST}" 2>/dev/null || true