Commit graph

1 commit

Author SHA1 Message Date
s8n
1a6a697afd Add pre-import cleanup + filename normalization rulesets
- 07-pre-import-cleanup: 1002-line ruleset for stripping non-media junk before
  files land in /home/user/media/. Catalogs 10 categories (codec promo,
  group brag, promo images, OS thumb caches, samples, sub leftovers, torrent
  residue, proof folders, multi-disc cruft, Win executables). NFO discriminator
  uses 4096-byte head + XML-root regex (covers prologue case the brief 100-byte
  version misses). 15 auto-delete security categories (.exe/.msi/.bat/.scr/...);
  threat model = friend clicking 'Download original' then running on Win.
  Verified extras folders against Jellyfin docs (lowercase 'featurettes',
  'behind the scenes', etc.). Includes idempotent dry-run-default
  cleanup-import.sh that quarantines first, returns staging path on stdout.

- 08-filename-normalization: 1853-line normative renaming ruleset.
  Canonical: 'Show (Year) - SXXEXX - Title.ext' for TV; '<Title> (<Year>).ext'
  for movies; 'Show - NNNN - Title [Sub|Dub].ext' for absolute-numbered anime.
  Strips group tags ([YIFY]/[RARBG]/[FS99 Joy]/[GalaxyRG]), resolution
  (1080p/2160p/4K), codec (x264/x265/HEVC/10bit), source (WEB-DL/BluRay/HDTV),
  audio (DTS-HD.MA/Atmos/5.1/AAC), release-process (PROPER/REPACK/INTERNAL),
  trailing -NOGRP/-RARBG/-EVO, URL refs, basename language tokens.
  Includes stdlib-only normalize.py: dry-run default, --apply commits,
  --force overwrites, audit log to /var/log/jellyfin-imports/<date>.log,
  idempotent. Worked Futurama before/after; flags drift on live tree
  (current 'Futurama/' lacks '(1999)').
2026-05-08 02:07:11 +01:00