Skip to content

Commit 98f231f

Browse files
NeWbY100claude
andcommitted
feat: SRR Creator overwrite prompt, granular log, no implicit SFV/NFO
- Prompt before overwriting an existing SRR output file. Cancelling leaves the previous log and progress UI untouched. - Pass nested vobsub SRR's stored files (vobsub SFV + sibling NFOs) explicitly to CreateFromSFVAsync now that the lib no longer auto-adds them. - Add CHANGELOG.md (Keep a Changelog format), document v1.2.2. - Bump ReScene.Lib submodule pointer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ac9a711 commit 98f231f

3 files changed

Lines changed: 83 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Changelog
2+
3+
All notable changes to ReScene.NET are documented here.
4+
Releases follow [SemVer](https://semver.org/) and this file follows
5+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6+
7+
## [1.2.2] — 2026-05-07
8+
9+
### Fixed
10+
11+
- SRR Creator now prompts before overwriting an existing output file
12+
instead of silently truncating it. Cancelling leaves the previous log
13+
and progress untouched.
14+
- Compare tab populates correctly when opening an SRR file. The
15+
v1.2.1 acronym rename created two `SRRFileData` types in different
16+
namespaces; the dispatch in `FileCompareViewModel` was matching the
17+
wrong sibling, leaving the tree empty.
18+
- `languages.diz` extraction now decompresses RAR-compressed VobSub
19+
`.idx` files via `RARDecompressor` instead of writing garbage from
20+
the packed bitstream. Solid archives, split files, and decompression
21+
failures surface a precise per-file skip warning.
22+
- SRR Creator no longer silently re-adds the SFV (and any sibling
23+
`.nfo` files) after the user removes them from the Stored Files
24+
list. `SRRWriter.CreateFromSFVAsync` now treats `additionalFiles`
25+
as the sole source of stored-file blocks; the WPF
26+
`ReleaseFileScanner` still pre-populates the UI list when an input
27+
is selected.
28+
29+
### Added
30+
31+
- Granular per-file log lines during SRR creation: `Adding stored
32+
file …`, `Computing OSO hashes…`, `Added OSO hash …`, `Scanning RAR
33+
archive for VobSub .idx files…`, `Adding languages.diz …`.
34+
- New `RARArchive` / `RAREntry` types in `ReScene.RAR` — a file-level
35+
view over a RAR volume set with `Open`, `Files`, `OpenPackedStream`,
36+
and `TryReadAllBytes` (transparent decompression). Replaces hand-rolled
37+
header-walk code that had been duplicated across consumers.
38+
- `RARArchiveOpenTests` (16 cases) and `RARVolumeNamingTests`
39+
(27 cases) covering the new abstraction and the volume-naming helper.
40+
- `SRRCreationResult.LanguagesDizIdxFiles` exposes the discovered
41+
`.idx` files; the SRR Creator log surfaces these on the success
42+
line.
43+
44+
### Changed
45+
46+
- Acronyms in identifiers and source-file names normalized to ALL
47+
CAPS to match the dominant convention: `RAR`, `SRR`, `SRS`, `SFV`,
48+
`EBML`, `MP3`, `MP4`, `MKV`, `AVI`, `WMV`, `ASF`, `ISO`, `OSO`,
49+
`CRC`, `MHD`, `LHD`. Mid-identifier and standalone occurrences are
50+
covered (e.g. `CreateSrrCommand``CreateSRRCommand`,
51+
`BlockCrcMismatch``BlockCRCMismatch`). Third-party namespaces and
52+
types (`Force.Crc32`, `Crc32Algorithm` from Crc32.NET,
53+
`DiscUtils.Iso9660`, BCL `System.IO.Hashing.Crc32`) are
54+
intentionally preserved.
55+
- `LanguagesDizGenerator` and `OSOHashCalculator` refactored onto
56+
`RARArchive`, dropping their duplicated header-walk loops.
57+
- `RarStream`'s previously-private volume-naming helper extracted to
58+
`RARVolumeNaming` and shared with `RARArchive`.
59+
60+
[1.2.2]: https://github.com/NeWbY100/ReScene.NET/releases/tag/v1.2.2

ReScene.NET/ViewModels/CreatorViewModel.cs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,17 @@ private bool CanCreateSRR() => !IsCreating
211211
[RelayCommand(CanExecute = nameof(CanCreateSRR))]
212212
private async Task CreateSRRAsync()
213213
{
214+
if (File.Exists(OutputPath))
215+
{
216+
bool proceed = await _fileDialog.ShowConfirmAsync(
217+
"Overwrite existing SRR?",
218+
$"An SRR file already exists at:\n\n{OutputPath}\n\nDo you want to overwrite it?");
219+
if (!proceed)
220+
{
221+
return;
222+
}
223+
}
224+
214225
IsCreating = true;
215226
ShowProgress = true;
216227
ProgressPercent = 0;
@@ -467,8 +478,18 @@ private async Task CreateVobsubSrrsAsync(string releaseDir, SRRCreationOptions o
467478

468479
try
469480
{
481+
// Nested SRRs have no UI to curate stored files, so explicitly pass the
482+
// vobsub SFV and any NFOs in its directory to be stored.
483+
var nestedStoredFiles = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
484+
string sfvDir = Path.GetDirectoryName(sfvPath) ?? ".";
485+
foreach (string nfoFile in Directory.GetFiles(sfvDir, "*.nfo"))
486+
{
487+
nestedStoredFiles[Path.GetFileName(nfoFile)] = nfoFile;
488+
}
489+
nestedStoredFiles[Path.GetFileName(sfvPath)] = sfvPath;
490+
470491
SRRCreationResult result = await _sRRService.CreateFromSFVAsync(
471-
srrPath, sfvPath, null, options, ct);
492+
srrPath, sfvPath, nestedStoredFiles, options, ct);
472493

473494
if (result.Success)
474495
{

0 commit comments

Comments
 (0)