[PR #4456] [MERGED] Emby.Naming - nullable & code coverage #9909

Closed
opened 2025-12-22 07:44:31 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/4456
Author: @martinek-stepan
Created: 11/10/2020
Status: Merged
Merged: 11/17/2020
Merged by: @joshuaboniface

Base: masterHead: emby-namig-nullable


📝 Commits (10+)

  • 59619b6 Enable nullable in Emby.Naming
  • 60b49e6 Re-Sharper inspection issues
  • 6437cf6 Removed Success property from AudioBookFilePathParserResult, since it was unused and consider only audiobooks that have chapter/page number in name makes no sense
  • e7a37be Simplify AudioBookResolver since there is no option of passing directories into it (AudioResolver.cs:179) and handling directories were not implemented anyway
  • f39775d Written test to finish coverage for AudioBookListResolver & AudioBookResolver and corrected some logical erros / unhandled exception
  • 50a2ef9 Simplify Resolve_InvalidExtension Test and created tests for Alternative Versions parsing & Year Extraction for audiobooks
  • 1e71775 Add Name and Year parsing for audiobooks
  • 7b6363b Update test for detecting audiobooks extras and alternative files
  • c060ed1 Added resolving of alternative files and extras for audibooks.
  • aef1fe6 Complete test coverage for Emby.Naming.Subtitles

📊 Changes

59 files changed (+1760 additions, -814 deletions)

View changed files

📝 Emby.Naming/Audio/AlbumParser.cs (+12 -3)
📝 Emby.Naming/Audio/AudioFileParser.cs (+9 -3)
📝 Emby.Naming/AudioBook/AudioBookFileInfo.cs (+16 -7)
📝 Emby.Naming/AudioBook/AudioBookFilePathParser.cs (+12 -5)
📝 Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs (+9 -5)
📝 Emby.Naming/AudioBook/AudioBookInfo.cs (+11 -4)
📝 Emby.Naming/AudioBook/AudioBookListResolver.cs (+117 -12)
Emby.Naming/AudioBook/AudioBookNameParser.cs (+67 -0)
Emby.Naming/AudioBook/AudioBookNameParserResult.cs (+18 -0)
📝 Emby.Naming/AudioBook/AudioBookResolver.cs (+20 -19)
📝 Emby.Naming/Common/EpisodeExpression.cs (+32 -10)
📝 Emby.Naming/Common/MediaType.cs (+3 -2)
📝 Emby.Naming/Common/NamingOptions.cs (+342 -306)
📝 Emby.Naming/Emby.Naming.csproj (+2 -1)
📝 Emby.Naming/Subtitles/SubtitleInfo.cs (+17 -3)
📝 Emby.Naming/Subtitles/SubtitleParser.cs (+17 -10)
📝 Emby.Naming/TV/EpisodeInfo.cs (+38 -7)
📝 Emby.Naming/TV/EpisodePathParser.cs (+22 -13)
📝 Emby.Naming/TV/EpisodePathParserResult.cs (+33 -4)
📝 Emby.Naming/TV/EpisodeResolver.cs (+19 -6)

...and 39 more files

📄 Description

  • Enable nullable for Emby.Naming project
  • Finish test coverage for Emby.Naming project

Changes

Two main changes are:

  1. Usage of constructors instead of {} for initialization
  2. Parsing of audiobook alternative files and extras

Issues

Resolves #4107
Part of issue #2768


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/4456 **Author:** [@martinek-stepan](https://github.com/martinek-stepan) **Created:** 11/10/2020 **Status:** ✅ Merged **Merged:** 11/17/2020 **Merged by:** [@joshuaboniface](https://github.com/joshuaboniface) **Base:** `master` ← **Head:** `emby-namig-nullable` --- ### 📝 Commits (10+) - [`59619b6`](https://github.com/jellyfin/jellyfin/commit/59619b6ea74ab555977fd213f6ee5737897b0fbd) Enable nullable in Emby.Naming - [`60b49e6`](https://github.com/jellyfin/jellyfin/commit/60b49e67eafd356d1276f43de1a3f1f2fe52fe3f) Re-Sharper inspection issues - [`6437cf6`](https://github.com/jellyfin/jellyfin/commit/6437cf69508076bab2d62bbe887f12b72d02f7b3) Removed Success property from AudioBookFilePathParserResult, since it was unused and consider only audiobooks that have chapter/page number in name makes no sense - [`e7a37be`](https://github.com/jellyfin/jellyfin/commit/e7a37bedfca159ab6a305833395aead07ccd872f) Simplify AudioBookResolver since there is no option of passing directories into it (AudioResolver.cs:179) and handling directories were not implemented anyway - [`f39775d`](https://github.com/jellyfin/jellyfin/commit/f39775dc3a813609454655c31dd5c6a1413cc890) Written test to finish coverage for AudioBookListResolver & AudioBookResolver and corrected some logical erros / unhandled exception - [`50a2ef9`](https://github.com/jellyfin/jellyfin/commit/50a2ef9d8aaf92e8b69ced5ea2fcc8fa185fe675) Simplify Resolve_InvalidExtension Test and created tests for Alternative Versions parsing & Year Extraction for audiobooks - [`1e71775`](https://github.com/jellyfin/jellyfin/commit/1e7177568887d0f808660454e5eb7ca7ebcd6998) Add Name and Year parsing for audiobooks - [`7b6363b`](https://github.com/jellyfin/jellyfin/commit/7b6363b09a3aabba3dcd285fd70d2eda8f1ea889) Update test for detecting audiobooks extras and alternative files - [`c060ed1`](https://github.com/jellyfin/jellyfin/commit/c060ed1a1853eaa28ae2f88f6b301c23cf326725) Added resolving of alternative files and extras for audibooks. - [`aef1fe6`](https://github.com/jellyfin/jellyfin/commit/aef1fe62c216612f3f42b2e19496730b56b155ce) Complete test coverage for Emby.Naming.Subtitles ### 📊 Changes **59 files changed** (+1760 additions, -814 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Naming/Audio/AlbumParser.cs` (+12 -3) 📝 `Emby.Naming/Audio/AudioFileParser.cs` (+9 -3) 📝 `Emby.Naming/AudioBook/AudioBookFileInfo.cs` (+16 -7) 📝 `Emby.Naming/AudioBook/AudioBookFilePathParser.cs` (+12 -5) 📝 `Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs` (+9 -5) 📝 `Emby.Naming/AudioBook/AudioBookInfo.cs` (+11 -4) 📝 `Emby.Naming/AudioBook/AudioBookListResolver.cs` (+117 -12) ➕ `Emby.Naming/AudioBook/AudioBookNameParser.cs` (+67 -0) ➕ `Emby.Naming/AudioBook/AudioBookNameParserResult.cs` (+18 -0) 📝 `Emby.Naming/AudioBook/AudioBookResolver.cs` (+20 -19) 📝 `Emby.Naming/Common/EpisodeExpression.cs` (+32 -10) 📝 `Emby.Naming/Common/MediaType.cs` (+3 -2) 📝 `Emby.Naming/Common/NamingOptions.cs` (+342 -306) 📝 `Emby.Naming/Emby.Naming.csproj` (+2 -1) 📝 `Emby.Naming/Subtitles/SubtitleInfo.cs` (+17 -3) 📝 `Emby.Naming/Subtitles/SubtitleParser.cs` (+17 -10) 📝 `Emby.Naming/TV/EpisodeInfo.cs` (+38 -7) 📝 `Emby.Naming/TV/EpisodePathParser.cs` (+22 -13) 📝 `Emby.Naming/TV/EpisodePathParserResult.cs` (+33 -4) 📝 `Emby.Naming/TV/EpisodeResolver.cs` (+19 -6) _...and 39 more files_ </details> ### 📄 Description <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> * Enable nullable for Emby.Naming project * Finish test coverage for Emby.Naming project **Changes** <!-- Describe your changes here in 1-5 sentences. --> Two main changes are: 1. Usage of constructors instead of {} for initialization 2. Parsing of audiobook alternative files and extras **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> Resolves #4107 Part of issue #2768 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-22 07:44:31 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#9909
No description provided.