findroid
findroid copied to clipboard
Move away from strings in conditions
This probably comes from Jellyfin SDK but they are trying to work on it as well. We should not use strings inside conditions and rather declare enums corresponding to SDK types and use those. For example item status (continuing/ended), item type (movie/series) etc.
Yeah I agree. But I think this should really be fixed in the SDK instead of only in this project
I disagree. Fix in SDK can take a long time and even if they change it to enum it is generally bad practice to depend on server side enums in you code since single change on their side means fixing your code in multiple places. Having own enum means you only have one place to fix. Great benefits for a little work.
You make a good point, I didn't think about that. Let's use enums in this project