2024-03-25, 01:45 AM
I've been trying to troubleshoot an external app connectivity to a new Windows 11 install of Jellyfin this weekend, particularly an HTTP post to trigger a library refresh.
As I understand, it should work for http://192.168.1.30:8096/library/refresh?api_key=xxxxx
This fails for me.
I have no issues with network reachability for devices on either end. I can file transfer and ping both directions. I've got media folder sources at the other device, which Jellyfin reads fine. My issue appears to be with the Jellyfin server config.
When I'm authenticated in the browser for Jellyfin, I should be able to navigate to http://192.168.1.30:8096/library/refresh and trigger a library refresh with a 204 response for library scan started, right?
https://github.com/jellyfin/jellyfin/blo...troller.cs
/// <summary>
/// Starts a library scan.
/// </summary>
/// <response code="204">Library scan started.</response>
/// <returns>A <see cref="NoContentResult"/>.</returns>
[HttpPost("Library/Refresh")]
[Authorize(Policy = Policies.RequiresElevation)]
[ProducesResponseType(StatusCodes.Status204NoContent)]
public async Task<ActionResult> RefreshLibrary()
{
try
{
await _libraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None).ConfigureAwait(false);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error refreshing library");
}
return NoContent();
}
When I use this URL, I get a 405 failure. I'm not sure where to look to investigate this issue further. Have I missed a setting to trigger refreshes in the web server? Am I using the wrong URL path?
My log file shows the request and session close but I only get the 405 error in the browser:
[2024-03-24 19:59:00.552 -04:00] [INF] [21] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.1.169" request
[2024-03-24 20:01:02.629 -04:00] [INF] [44] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.1.169" closed
[2024-03-24 20:16:26.797 -04:00] [INF] [86] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "127.0.0.1" request
[2024-03-24 20:16:42.135 -04:00] [INF] [17] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "127.0.0.1" closed
To be clear, I cannot trigger a refresh from (1) the remote app with the API key or (2) from an authenticated session directly in the browser.
I'd be happy to be the idiot who missed a setting somewhere but I'm at a loss here. Any guidance would be appreciated.
As I understand, it should work for http://192.168.1.30:8096/library/refresh?api_key=xxxxx
This fails for me.
I have no issues with network reachability for devices on either end. I can file transfer and ping both directions. I've got media folder sources at the other device, which Jellyfin reads fine. My issue appears to be with the Jellyfin server config.
When I'm authenticated in the browser for Jellyfin, I should be able to navigate to http://192.168.1.30:8096/library/refresh and trigger a library refresh with a 204 response for library scan started, right?
https://github.com/jellyfin/jellyfin/blo...troller.cs
/// <summary>
/// Starts a library scan.
/// </summary>
/// <response code="204">Library scan started.</response>
/// <returns>A <see cref="NoContentResult"/>.</returns>
[HttpPost("Library/Refresh")]
[Authorize(Policy = Policies.RequiresElevation)]
[ProducesResponseType(StatusCodes.Status204NoContent)]
public async Task<ActionResult> RefreshLibrary()
{
try
{
await _libraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None).ConfigureAwait(false);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error refreshing library");
}
return NoContent();
}
When I use this URL, I get a 405 failure. I'm not sure where to look to investigate this issue further. Have I missed a setting to trigger refreshes in the web server? Am I using the wrong URL path?
My log file shows the request and session close but I only get the 405 error in the browser:
[2024-03-24 19:59:00.552 -04:00] [INF] [21] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.1.169" request
[2024-03-24 20:01:02.629 -04:00] [INF] [44] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.1.169" closed
[2024-03-24 20:16:26.797 -04:00] [INF] [86] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "127.0.0.1" request
[2024-03-24 20:16:42.135 -04:00] [INF] [17] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "127.0.0.1" closed
To be clear, I cannot trigger a refresh from (1) the remote app with the API key or (2) from an authenticated session directly in the browser.
I'd be happy to be the idiot who missed a setting somewhere but I'm at a loss here. Any guidance would be appreciated.