Skip to content

Fix Jellyfin search returning folders alongside audiobooks#1503

Merged
GianniCarlo merged 1 commit intoTortugaPower:developfrom
matalvernaz:fix/jellyfin-search-duplicates
Apr 7, 2026
Merged

Fix Jellyfin search returning folders alongside audiobooks#1503
GianniCarlo merged 1 commit intoTortugaPower:developfrom
matalvernaz:fix/jellyfin-search-duplicates

Conversation

@matalvernaz
Copy link
Copy Markdown
Contributor

Purpose

Fixes a bug where Jellyfin search results include both folders and audiobooks when they share the same name. Only audiobooks should appear in search results.

This is Jellyfin-specific — AudiobookShelf uses a dedicated /search endpoint that only returns books server-side, so it's not affected.

Approach

One-line change in JellyfinConnectionService.fetchItems — the itemTypes filter now also checks for searchTerm != nil, excluding folders from search results while preserving them for normal folder-level browsing.

Related tasks

Fixes #1502

Things to be aware of

  • When browsing (no search term, not recursive): both audiobooks and folders are returned for navigation
  • When searching or browsing recursively: only audiobooks are returned

When searching, both folders and audiobooks with the same name appear
in results. The itemTypes filter only checked the `recursive` parameter
but not whether a search was being performed. Since search calls pass
recursive=false, folders were incorrectly included.

Fixes TortugaPower#1502
@GianniCarlo GianniCarlo merged commit 0f94162 into TortugaPower:develop Apr 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jellyfin search returns folders alongside audiobooks with the same name

2 participants