[Suggestion] Collaborative Jellyfin API for Dart #480
Replies: 4 comments 4 replies
-
That sounds like a good idea. I personally found Chopper a bit cumbersome to use, but I'm coming from a JavaScript background. In general I think there should definitely be an abstraction layer on top of any schema-generated API, so that breaking changes can be handled more easily or upcoming endpoints can be stubbed in advance. We could name it tentacle 🐙 :D |
Beta Was this translation helpful? Give feedback.
-
This would be really nice! It would probably be a good idea to use a generated API client given how big the Jellyfin API is. My client is jankily handmade, and would be pretty terrible to use outside of Finamp (it isn't great to use within lol). I personally won't be able to switch over until I migrate to Isar (my models all have specific Hive ids), but once that's done I should be able to. I'll probably keep them around as legacy types so that I can migrate old users to Isar. We'll also need a way to attach stuff to the generated models, as I've added getters/setters to some models to make my life easier, such as these on BaseItemDto: finamp/lib/models/jellyfin_models.dart Lines 2178 to 2202 in e86c5d7 And Tentacle is a good name lol |
Beta Was this translation helpful? Give feedback.
-
That all sounds great. My current implementation using the OpenAPI generator but I have encountered some bugs that I have had to work around. It does have have stuff such as I personally also really like the name Tentacle. In regards to migrating over to Isar, I might make sense from a technical standpoint to migrate over to a new API first before Isar but doing so in the same update because it is possible it might help making the transition easier by allowing you to create easier relations between the new Database and new API rather than first having to migrate over the database with having to make corresponding call to the old API, then work on a API, then having to transition to the new API. I trust your judgement at the end of the day for your project but that is my perspective. This is my current API that is using the OpenAPI generator in-case your curious as to how it generated it: https://github.com/Kara-Zor-El/jellyfin_api/ |
Beta Was this translation helpful? Give feedback.
-
Hi, I am just checking in. It seems like the Isar transition has not started yet from what I can see. Do you still plan on working on it? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am the developer of JellyBook which is another Jellyfin client written in Dart/Flutter. I was looking through your repository after seeing you planning on migration from Hive to Isar (good call btw, it was a noticeable difference).
Anyways, I realized that We both have implementation of the Jellyfin API. One generated using Chopper and one generated using the OpenAPI dart-dio generator. I was thinking that rather than having these 2 API's bindings used to community to Jellyfin, instead we could perhaps separate out one of ours into its own package that could be used by both our clients and could help any future Jellyfin client developers thinking of using Flutter and Dart to write their client.
Feed free to reply to this discussion to talk about it or to dm me.
Best, Kara
Ps. Would love to chat with you about your experiences building Finamp and working with Flutter in general
Beta Was this translation helpful? Give feedback.
All reactions