github therobbiedavis/Listenarr 0.1.43
Canary 0.1.43

latest releases: 0.2.40, 0.2.39, 0.2.38...
pre-releaseone month ago

This pull request refactors how audiobook base directories and manual import paths are computed, making directory structure generation more predictable and testable. The changes focus on improving the handling of file naming patterns for both regular and manual imports, and add tests to ensure correctness.

Directory and Path Computation Improvements:

  • Refactored ComputeAudiobookBaseDirectoryFromPattern to strip file-specific variables (like {DiskNumber} and {ChapterNumber}) from the naming pattern, ensuring only directory-level metadata is used to build the base path. The method now combines the cleaned pattern with the root path and returns the full directory path, rather than extracting a directory from a file path. [1] [2]
  • Updated manual import path generation in GenerateManualImportPathAsync to use a simplified directory pattern ({Series}/{Title} or {Title}) and to always include the correct file extension. The result is a full path combining the audiobook's base path and the generated relative path. [1] [2]

Testing Enhancements:

  • Added a new test file LibraryController_BasePathTests.cs with unit tests for ComputeAudiobookBaseDirectoryFromPattern, verifying correct directory paths for both series and non-series audiobooks.

General Codebase Improvements:

  • Added System.Text.RegularExpressions import to support pattern cleaning in directory computation.

Automated canary build

  • Version: 0.1.43
  • Commit: 1e30bd5
  • Original PR: #96

Don't miss a new Listenarr release

NewReleases is sending notifications on new releases.