Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apiclient only works with 10.7 or up #124

Closed
nielsvanvelzen opened this issue Oct 11, 2020 · 4 comments
Closed

Apiclient only works with 10.7 or up #124

nielsvanvelzen opened this issue Oct 11, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@nielsvanvelzen
Copy link
Member

The next Jellyfin version, 10.7, adds new properties that are not-null. Because of this those types are not-null in the apiclient too. This will cause issues with JSON deserialization when using the apiclient with 10.6<=.

Example:
A new property in PublicSystemInfo, StartupWizardCompleted (boolean, not null) was added. If we now use getPublicSystemInfo in SystemApi it will fail for servers not emitting that field because we can't set it to a default value.

@nielsvanvelzen nielsvanvelzen added the bug Something isn't working label Oct 11, 2020
@nielsvanvelzen
Copy link
Member Author

One possible solution is to require new properties in the server to be nullable. Another solution is to make literally everything nullable in the apiclient (which I'd like to avoid).

@Maxr1998
Copy link
Member

I suppose you don't want to support multiple API versions inside the code?

@nielsvanvelzen
Copy link
Member Author

We could do that by releasing model & api with a separate version scheme. But it's a lot of effort to manage and we have no openapi schema for 10.6 so we still have the issue that the apiclient is 10.7>= only.

@nielsvanvelzen
Copy link
Member Author

I've created jellyfin/jellyfin#4309 to fix the PublicSystemInfo model. With this we can still connect to older Jellyfin servers so we can read their version and show an error that the server uses an unsupported version.

Ideally I'd like to support 10.6 too but I guess that's kinda hard since we need to find all new/changed properties since 10.6 to make them nullable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants