[PR #9446] [MERGED] Audiobook grouping fixes #11933

Closed
opened 2025-12-22 09:01:24 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/9446
Author: @1337joe
Created: 3/7/2023
Status: Merged
Merged: 3/9/2023
Merged by: @Bond-009

Base: masterHead: audiobook-grouping-fixes


📝 Commits (4)

  • 160baa0 Remove some BaseItem references to make ItemResolveArgs more usable for testing.
  • 1c3a97b Inject IDirectoryService where needed instead of passing it through ItemResolveArgs
  • 18b8efa Add tests for audio book resolving
  • 361fff3 Fix cases where multiple files are resolved as a single book

📊 Changes

16 files changed (+153 additions, -57 deletions)

View changed files

📝 Emby.Server.Implementations/Library/LibraryManager.cs (+5 -3)
📝 Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs (+2 -1)
📝 Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs (+5 -2)
📝 Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs (+9 -6)
📝 Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs (+5 -2)
📝 Emby.Server.Implementations/Library/Resolvers/ExtraResolver.cs (+5 -3)
📝 Emby.Server.Implementations/Library/Resolvers/GenericVideoResolver.cs (+4 -2)
📝 Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs (+7 -6)
📝 Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs (+14 -4)
📝 Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs (+4 -2)
📝 MediaBrowser.Controller/Entities/AggregateFolder.cs (+1 -1)
📝 MediaBrowser.Controller/Entities/CollectionFolder.cs (+1 -1)
📝 MediaBrowser.Controller/Library/ItemResolveArgs.cs (+8 -17)
tests/Jellyfin.Server.Implementations.Tests/Library/AudioResolverTests.cs (+76 -0)
📝 tests/Jellyfin.Server.Implementations.Tests/Library/EpisodeResolverTest.cs (+5 -5)
📝 tests/Jellyfin.Server.Implementations.Tests/Library/MovieResolverTests.cs (+2 -2)

📄 Description

There's logic in place to stack individual audio book files as chapters/parts of a single book. Unfortunately there's not yet any way to actually browse stacked files, so in most cases the file stack is ignored in favor of the directory view.

This PR adds tests and fixes a couple corner cases that should currently be ignored but weren't. There should be fewer cases where file names unexpectedly cause a folder of audio book files to collapse to a single accessible file.

Changes

  • Clean up ItemResolveArgs:
    • remove some BaseItem references
    • refactor IDirectoryService to be injected where used instead of passed around in ItemResolveArgs
  • Add audiobook tests for AudioResolver
  • Fix cases where multiple files unexpectedly resolved into a single file representing the book

Issues
Fixes #9382
Probably fixes #8404 (no directory listings provided to verify)
May fix #7875


🔄 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/9446 **Author:** [@1337joe](https://github.com/1337joe) **Created:** 3/7/2023 **Status:** ✅ Merged **Merged:** 3/9/2023 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `master` ← **Head:** `audiobook-grouping-fixes` --- ### 📝 Commits (4) - [`160baa0`](https://github.com/jellyfin/jellyfin/commit/160baa02fd9a2e7b4e2b3dcc28769274d0588413) Remove some BaseItem references to make ItemResolveArgs more usable for testing. - [`1c3a97b`](https://github.com/jellyfin/jellyfin/commit/1c3a97bf6adadf4e3b22177e1e965691637d0426) Inject IDirectoryService where needed instead of passing it through ItemResolveArgs - [`18b8efa`](https://github.com/jellyfin/jellyfin/commit/18b8efa7e0c532ce51a0d72a6d8690f8f4a3f302) Add tests for audio book resolving - [`361fff3`](https://github.com/jellyfin/jellyfin/commit/361fff3a0c1b2e5c14e991d53f5736e909b889b6) Fix cases where multiple files are resolved as a single book ### 📊 Changes **16 files changed** (+153 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/Library/LibraryManager.cs` (+5 -3) 📝 `Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs` (+2 -1) 📝 `Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs` (+5 -2) 📝 `Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs` (+9 -6) 📝 `Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs` (+5 -2) 📝 `Emby.Server.Implementations/Library/Resolvers/ExtraResolver.cs` (+5 -3) 📝 `Emby.Server.Implementations/Library/Resolvers/GenericVideoResolver.cs` (+4 -2) 📝 `Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs` (+7 -6) 📝 `Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs` (+14 -4) 📝 `Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs` (+4 -2) 📝 `MediaBrowser.Controller/Entities/AggregateFolder.cs` (+1 -1) 📝 `MediaBrowser.Controller/Entities/CollectionFolder.cs` (+1 -1) 📝 `MediaBrowser.Controller/Library/ItemResolveArgs.cs` (+8 -17) ➕ `tests/Jellyfin.Server.Implementations.Tests/Library/AudioResolverTests.cs` (+76 -0) 📝 `tests/Jellyfin.Server.Implementations.Tests/Library/EpisodeResolverTest.cs` (+5 -5) 📝 `tests/Jellyfin.Server.Implementations.Tests/Library/MovieResolverTests.cs` (+2 -2) </details> ### 📄 Description There's logic in place to stack individual audio book files as chapters/parts of a single book. Unfortunately there's not yet any way to actually browse stacked files, so in most cases the file stack is ignored in favor of the directory view. This PR adds tests and fixes a couple corner cases that should currently be ignored but weren't. There should be fewer cases where file names unexpectedly cause a folder of audio book files to collapse to a single accessible file. **Changes** - Clean up ItemResolveArgs: - remove some BaseItem references - refactor IDirectoryService to be injected where used instead of passed around in ItemResolveArgs - Add audiobook tests for AudioResolver - Fix cases where multiple files unexpectedly resolved into a single file representing the book **Issues** Fixes #9382 Probably fixes #8404 (no directory listings provided to verify) May fix #7875 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-22 09:01:24 +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#11933
No description provided.