Fix LibraryItemState snake_case and camelCase inconsistency
We have 2 different ways of representing video_id - snake_case and camelCase, this should be fixed and aligned with core
In core we now use video_id (snake_case) although all other fields are camelCase.
-
core-web -
videoIdin CW LibraryItemState - https://github.com/Stremio/stremio-core-web/blob/936ab4116a5d071dc604a57b26e0a90a3e63a939/src/model/serialize_continue_watching_preview.rs#L106-L110 -
core-web -
video_idin Player LibraryItemState - https://github.com/Stremio/stremio-core-web/blob/af66b2eb6bd1aae35e18cdf66e70879100ee7fd5/src/model/serialize_player.rs#L67-L73 -
[ ] Fix
LibraryItemState(core)snake_casefield -
[ ] Fix the 2
LibraryItemStateincore-web
Is not clear, both links references to the same file and line
You are correct, I just fixed the link.
Core LibraryItemState might not be fixable because this will trigger bad deserialization in apps like stremio-web which store locally a serialised version of the Libarary in one form or another
ok, so a ticket must be created in that repo. Which other app might be impacted due to this change?
We need to double check if this field is used in the API, if it is we cannot change it but we could add an alias. All applications will be affected due to the fact that LibraryItems are stored in Local storage depending on the app, e.g. web uses Local storage.
@elpiel this propery is used in the go server and must be named like that, As a last resort we could use 2 separate serializators, one for the API, and one for the JS layer