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

Update WebSocket code to generated models #774

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

nielsvanvelzen
Copy link
Member

@nielsvanvelzen nielsvanvelzen commented Jun 28, 2023

Thanks to the amazing work from @crobibero we can now (with 10.9) use the WebSocket models from the OpenAPI specification. This PR updates our implementation to use those models.

  • Delete manually added WebSocket models
  • Update WebSocket code to use generated models
  • Catch deserialization issues so the connection doesn't stop forwarding messages

Note: subscriptions still need to be manually added to subscriptionTypes.kt, I don't think we can really automate that.

Note2: New models are incompatible with old models because we used different names for some properties. Running the 10.9 spec with a 10.8 server and the other way around mostly works though.

Note3/reminder: Docs still need updating <-- 2024 update: will update documentation later ©️

Draft until 10.9 beta's start rolling out.

@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Jun 28, 2023
@nielsvanvelzen nielsvanvelzen added this to the v1.5.0 milestone Jun 28, 2023
@jellyfin-bot jellyfin-bot added the merge conflict Conflicts prevent merging label Aug 27, 2023
@jellyfin-bot jellyfin-bot removed the merge conflict Conflicts prevent merging label Mar 4, 2024
@jellyfin-bot jellyfin-bot added the merge conflict Conflicts prevent merging label Mar 25, 2024
@jellyfin-bot jellyfin-bot removed the merge conflict Conflicts prevent merging label Mar 25, 2024
@nielsvanvelzen
Copy link
Member Author

Made this a year ago.. Didn't think 10.9 would be this far away at that time.

I didn't test it now but as it is mostly switching from the old manually written models to the auto-generated once it should just work. I have some more changes I'd like to make to the WebSocket implementation anyway which I will do in another PR later.

Copy link
Member

@Maxr1998 Maxr1998 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Maxr1998 Maxr1998 merged commit d624a6a into jellyfin:master Mar 25, 2024
12 checks passed
@nielsvanvelzen nielsvanvelzen deleted the 109-ws branch March 26, 2024 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants