Skip to content

Conversation

@beanbaganalytica
Copy link
Contributor

Problem

Autosync fails to refresh Jellyfin libraries when EnableLegacyAuthorization is disabled, which is the default setting in modern Jellyfin installations.

Root Cause

Autosync uses the legacy X-MediaBrowser-Token header inherited from Emby. Modern Jellyfin requires the Authorization: MediaBrowser Token="<key>" header format when legacy auth is disabled.

Solution

Updated JellyfinServer.scan_path(), MediaServerScanner._scan_jellyfin(), and the test connection endpoint to use the modern authentication header format per the official Jellyfin API documentation.

Testing

  • ✅ Tested with Jellyfin 10.11.5 with EnableLegacyAuthorization=false (default)
  • ✅ Tested with Jellyfin 10.11.5 with EnableLegacyAuthorization=true (backward compatible)
  • ✅ Library refresh operations succeed with both configurations
  • ✅ Connection test endpoint continues to work

Backward Compatibility

The modern header format is accepted by Jellyfin regardless of the legacy auth setting, ensuring backward compatibility.

Reference

Official Jellyfin API Authentication documentation: https://gist.github.com/nielsvanvelzen/ea047d9028f676185832e51ffaf12a6f

- Replace legacy X-MediaBrowser-Token header with modern Authorization format
- Uses MediaBrowser scheme per official Jellyfin API docs
- Fixes 401 errors when EnableLegacyAuthorization is disabled (default in 10.11+)
- Maintains backward compatibility with legacy auth enabled
- Tested with Jellyfin 10.11.5

Reference: https://gist.github.com/nielsvanvelzen/ea047d9028f676185832e51ffaf12a6f
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.

1 participant