NEXUS RENAME v0.2.3 — Readable backups and episode titles
===========================================

WHAT IT DOES
Scans MKV TV episodes, looks up series/episode details using TVmaze, detects
resolution from the video track, and previews names such as:
  the.big.bang.theory.s01e02.the.big.bran.hypothesis.2007.720p.rmteam.mkv
The group suffix is always rmteam as requested; it is not provenance detection.
The original file extension stays .mkv. No video or audio is re-encoded.

START HERE
1. Extract this complete ZIP to a normal writable folder.
2. Install MKVToolNix for Windows from its official download page:
   https://mkvtoolnix.download/downloads.html#windows
   Alternatively copy its COMPLETE portable distribution into our Tools folder.
   Do not copy just the EXEs: they may require accompanying libraries.
   Required: mkvmerge.exe, mkvpropedit.exe and mkvextract.exe.
3. Double-click NexusRename.exe. No app installation is required.
   Optional CMD/VBS launchers are also included.
4. Choose a folder. For a folder containing different shows, leave the show
   selector empty and the app will accept only unique exact-name matches.
5. For one show, enter its name, click Find show, select the correct series
   (check its year), then click Scan folder. A selected series applies to ALL
   files in the scan, so do not use this mode for mixed-show folders.
6. Review the proposed names, untick unwanted rows, then Rename checked.
   Start with COPIES of two or three episodes for your first Windows test.
7. Close/reopen the episode in VLC to refresh its displayed title.

DEFAULTS
- Include subfolders: on. Backup/history folders and linked subfolders excluded.
- Clear MKV titles: on. Clears the segment title and global TITLE tags, retaining
  other metadata and track titles. Selected files are copied, edited and then
  checked before the originals are moved into backup storage.
- Rename subtitles: on. Same-stem SRT/ASS/SSA/SUB/IDX/VTT sidecars are renamed,
  including suffixes such as .en.forced.srt. Contents are unchanged.
- Year: episode air year; dropdown also offers the series premiere year.
- Resolution: detected from actual encoded video dimensions. 480p/576p/720p/
  1080p/1440p/2160p/4320p output categories include common cropped video sizes.

UNDO AND DISK SPACE
Title edits require free space equal to the selected videos on each video's
volume. Complete originals are retained in .nexusrename-backups alongside the
source files; journals are in .nexusrename-history under your scan folder.
These folders deliberately remain after a batch. Keep them for Undo.
Undo latest batch uses the folder currently selected; select the SAME scan
root as before. It restores names and the entire original MKV, including tags.
It checks SHA-256 before replacing output. If a file was modified after rename,
Undo leaves it for manual review. It can also recover most interrupted batches.
If a batch stops part-way, use Undo before scanning/applying again.
Operations are sequential, so a failure can leave a partially completed batch.
Do not manually alter the journal files. Backup files remain available to copy
back manually if recovery is needed. Do not move source folders before Undo.
Once satisfied, you may manually delete the two Nexus history/backup folders
in the affected folders to reclaim space. This permanently removes Undo.
No automatic backup pruning is performed.

SUPPORTED IDENTIFICATION
S01E02, s1e02, 1x02 and explicit S01E02E03 / 1x02x03.
Unclear names, episode ranges, missing dates/episodes, ambiguous matches and
collisions are marked REVIEW and skipped. It does not identify episodes by
watching the video. TVmaze uses its default episode order; DVD/streaming order
can differ, so check previews. Combined episodes use the first episode's year.
Use Find show to correct a missing/unclear series name. To clear a selected
series for mixed-show auto-detection, click Auto and scan again.
Same-name files that differ only in letter case are not changed in rename-only
mode. Files already matching the requested name can still have titles cleared.

REQUIREMENTS / FIRST-BUILD LIMITS
Windows 10/11, built-in .NET Framework 4.8, internet
access to api.tvmaze.com and MKVToolNix. No administrator access for Nexus Rename.
A ready-to-run .NET Framework Windows EXE is included alongside its complete
C# source. Settings live in %LOCALAPPDATA%\NexusRename; the app folder can be
carried on USB. Build-NexusRename.ps1 optionally rebuilds it using Windows
PowerShell 5.1 and the built-in C# compiler. MKVToolNix is a separate dependency and is NOT
bundled. The EXE is not signed. Managed IT policy may block unsigned applications.
Large files take time to copy and hash. The window remains responsive while
processing; wait for the operation to finish before closing the app.
The interface and file workflows were exercised under Mono on a Linux virtual
display. Native Windows playback/Explorer integration still needs testing.
See VALIDATION.txt for checks that were actually performed.

PRIVACY AND DATA CREDITS
Only show search text and TVmaze IDs are sent for online lookups, not videos,
full local paths or filenames. No login, API key or telemetry is used.
Episode metadata: TVmaze https://www.tvmaze.com
API: https://www.tvmaze.com/api — data licensed CC BY-SA
https://creativecommons.org/licenses/by-sa/4.0/
Nexus Rename source is supplied under GPL-3.0-or-later; see LICENSE.txt.
MKVToolNix is separate software; obtain it from its author under its own licence.

0.1.1: Fixes missing String.Split method on Windows during Scan folder.

INTRODUCED IN 0.2.0
- Completed files remain in the main table with the original filename, new
  filename and green checkmark/status. Completed checkboxes are locked so
  clicking Rename again does not resubmit them.
- Failures remain visible in red, including partial batches.
- Undo retains the row with a blue Restored status and restores file actions
  to the original file location. Undo after reopening also shows restored files.
- Open folder selects the current file in Windows Explorer. Without a row
  selected, it opens the chosen scan folder.
- Double-click a filename/status cell to play the current file. A standard
  VLC installation is preferred; otherwise the Windows default player is used.
- Rounded blue buttons, clearer table headings, per-file operation progress
  and a result summary. Progress advances per completed file (not per byte).
- Auto clears the chosen show for mixed-show automatic matching.
Results stay visible until the next scan, folder/show/filter change or app exit.
The on-screen results list is not saved between app launches; Undo journals are.
MKVToolNix remains a separate dependency in this release.

NEW IN 0.2.1
- Episode titles appear immediately after season/episode numbers, then year,
  resolution and the fixed rmteam suffix. Combined files join both titles
  with 'and'. Punctuation is converted to filename-safe dots.
- Introduced readable backup names (superseded by the full-name format below).
- Existing backups and journals are unchanged and remain usable by Undo.
  Do not rename old backups by hand: the journal points to their existing names.
- Missing episode titles and paths exceeding this build's Windows path limit
  are flagged for review before files are changed.

NEW IN 0.2.2
New backups preserve the ENTIRE original filename exactly (including spaces,
punctuation and .mkv), followed by .backup- and a six-character identifier:
  The.Big.Bang.Theory.S01E02.The.Big.Bran.Hypothesis.2007.720p.rmteam.mkv.backup-abc123
The backup ID is the very last part. Nothing follows it. Backup names are never
silently shortened or sanitized. If the complete name/path would exceed this
build's Windows limits, the file is flagged before the batch changes files.
Undo restores the original .mkv filename normally. To open a backup manually,
use VLC's Open File or copy it elsewhere and remove only its .backup-ID suffix.
Existing backups are unchanged; both older naming formats still work with Undo.

NEW IN 0.2.3 — MATCHING DIALOGS AND SCROLLBARS
- App confirmation, information and error pop-ups now use the pale app
  background, rounded outline and matching blue buttons.
- Rename confirmation has Rename files and Cancel. Escape or closing the
  dialog cancels. A long message has its own themed scrollbar.
- Blue custom scrollbars in the file list (both directions when needed), log,
  show-match dropdown and year selector dropdown. Mouse-wheel, thumb dragging,
  arrow keys, Page Up/Down and Home/End are supported.
- Dropdown options keep keyboard/mouse selection. Log text remains selectable
  for copying. The log wraps long lines instead of needing a horizontal bar.
- Pop-ups can be moved by dragging their title.
- The folder chooser is the standard Windows system dialog.

This version still needs a quick native Windows visual/scrolling check; tests
ran on the build host under Mono/Xvfb. MKVToolNix remains a separate dependency.
