[PR #2278] [CLOSED] Fix null reference exception on API call without user id #9061

Closed
opened 2026-02-07 05:55:24 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/2278
Author: @mregni
Created: 1/14/2020
Status: Closed

Base: masterHead: bugfix-2246


📝 Commits (1)

  • 0e7a78e Added support for NULL user

📊 Changes

1 file changed (+19 additions, -17 deletions)

View changed files

📝 MediaBrowser.Api/UserLibrary/ItemsService.cs (+19 -17)

📄 Description

Changes
I added a fallback to the rootfolder of the library when no user is passed into the GetQueryResult function. This can happen when the /Items API is called without a UserId in the query. This call was/is supported on Emby and is useful for any app that wants to display a list of items in a library without the need of a user (via API key authentication).

Issues
Fixes #2246


🔄 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/2278 **Author:** [@mregni](https://github.com/mregni) **Created:** 1/14/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `bugfix-2246` --- ### 📝 Commits (1) - [`0e7a78e`](https://github.com/jellyfin/jellyfin/commit/0e7a78ea719d7434292dcc19acd959eaeaacf347) Added support for NULL user ### 📊 Changes **1 file changed** (+19 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `MediaBrowser.Api/UserLibrary/ItemsService.cs` (+19 -17) </details> ### 📄 Description **Changes** I added a fallback to the rootfolder of the library when no user is passed into the GetQueryResult function. This can happen when the /Items API is called without a UserId in the query. This call was/is supported on Emby and is useful for any app that wants to display a list of items in a library without the need of a user (via API key authentication). **Issues** Fixes #2246 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 05:55:24 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#9061