feat: slskd reconnect guard in downloaders_reset, mass v2 sync
- downloaders_reset: connection check block before slskd API sections; triggers PUT /api/v0/server reconnect if disconnected, polls 60s, gates Stuck Searches and Dead Transfer Records on SLSKD_CONNECTED - Sync all modified/new/deleted files from v2 refactor across Docker_Essentials, Media, Monitors, Partnership, Rsync, Tools, Transcodes, unRAID_Essentials, common.sh, master confs, and new Manual/README docs
This commit is contained in:
+31
-19
@@ -2,20 +2,24 @@
|
||||
# ==============================================================================================
|
||||
# ================================= Media Cleaner ==============================================
|
||||
# ==============================================================================================
|
||||
# Removes unwanted junk files from media share folders using configurable file patterns.
|
||||
# Two profiles — anime and media — each with their own folder list and file patterns.
|
||||
# Runs daily via DAILY_MAINTENANCE_SCRIPTS after media_shares_permissions.sh.
|
||||
#
|
||||
# ── PROFILES ──────────────────────────────────────────────────────────────────────────────────
|
||||
# PURPOSE
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Remove junk files from media shares using configurable file patterns. Two
|
||||
# profiles — anime and media — each with their own folder list and patterns.
|
||||
# Runs second in the daily maintenance window, after permissions and before
|
||||
# arr cleanup, so orphan detection only encounters actual media files.
|
||||
#
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL MODEL
|
||||
# ==============================================================================================
|
||||
#
|
||||
# Profiles:
|
||||
# anime — cleans ANIME_CLEAN_FOLDERS using ANIME_FILE_PATTERNS
|
||||
# typical targets: *.sfv *.nfo *.url *.rar *.zip *.sample* etc.
|
||||
# media — cleans MEDIA_CLEAN_FOLDERS using MEDIA_FILE_PATTERNS (adds *.iso *.lrc)
|
||||
#
|
||||
# media — cleans MEDIA_CLEAN_FOLDERS using MEDIA_FILE_PATTERNS
|
||||
# same patterns plus *.iso *.lrc (media-specific extras)
|
||||
#
|
||||
# ── WHAT IT REMOVES ───────────────────────────────────────────────────────────────────────────
|
||||
# Junk files left behind by download clients, scene releases, and various tools:
|
||||
# *.sfv *.md5 *.sha1 — checksum verification files — useless post-download
|
||||
# Removes junk left by download clients, scene releases, and tools:
|
||||
# *.sfv *.md5 *.sha1 — checksum files — useless post-download
|
||||
# *.nfo *.url *.lnk — scene info files — not needed in media library
|
||||
# *.rar *.zip — archives — source files not needed after extraction
|
||||
# *.sample* *.proof* — scene samples — never needed
|
||||
@@ -24,12 +28,10 @@
|
||||
# *.torrent — torrent files left by download clients
|
||||
# *.log *.json — tool output files
|
||||
#
|
||||
# ── HOST AWARENESS ────────────────────────────────────────────────────────────────────────────
|
||||
# detect_hosts() sets MY_ID and aliases HOST*_ANIME_CLEAN_FOLDERS → ANIME_CLEAN_FOLDERS
|
||||
# and HOST*_MEDIA_CLEAN_FOLDERS → MEDIA_CLEAN_FOLDERS.
|
||||
# Each server only cleans the shares it owns — correct folders per host automatically.
|
||||
# ==============================================================================================
|
||||
# OPERATIONAL SAFEGUARDS
|
||||
# ==============================================================================================
|
||||
#
|
||||
# ── SAFEGUARDS ────────────────────────────────────────────────────────────────────────────────
|
||||
# acquire_lock "wait" — wait if previous run still active
|
||||
# detect_hosts() — correct folder lists per host via MY_ID aliases
|
||||
# Empty array guards — warns and exits cleanly if no folders or patterns configured
|
||||
@@ -37,22 +39,32 @@
|
||||
# validate_unraid_cmd — notify script validated before use
|
||||
# Silent by default — only problems and removals produce output
|
||||
#
|
||||
# ── CONFIGURATION (master_host*.conf) ─────────────────────────────────────────────────────────
|
||||
# ==============================================================================================
|
||||
# CONFIGURATION
|
||||
# ==============================================================================================
|
||||
#
|
||||
# master_host*.conf
|
||||
#
|
||||
# HOST*_ANIME_CLEAN_FOLDERS — folders cleaned by the anime profile on this host
|
||||
# HOST*_MEDIA_CLEAN_FOLDERS — folders cleaned by the media profile on this host
|
||||
# Aliased by detect_hosts() — script uses ANIME_CLEAN_FOLDERS / MEDIA_CLEAN_FOLDERS
|
||||
#
|
||||
# ── CONFIGURATION (master.conf) ───────────────────────────────────────────────────────────────
|
||||
# master.conf
|
||||
#
|
||||
# ANIME_FILE_PATTERNS — file patterns removed by the anime profile
|
||||
# MEDIA_FILE_PATTERNS — file patterns removed by the media profile
|
||||
#
|
||||
# ── USAGE ─────────────────────────────────────────────────────────────────────────────────────
|
||||
# ==============================================================================================
|
||||
# RUNTIME MODES
|
||||
# ==============================================================================================
|
||||
#
|
||||
# media_cleaner.sh anime — clean anime shares
|
||||
# media_cleaner.sh media — clean media shares
|
||||
# media_cleaner.sh anime --dry-run — preview anime clean, no deletions
|
||||
# media_cleaner.sh media --dry-run — preview media clean, no deletions
|
||||
# media_cleaner.sh anime --log — verbose output
|
||||
# media_cleaner.sh anime --status — show config and exit
|
||||
#
|
||||
# ==============================================================================================
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
Reference in New Issue
Block a user