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

Retrieving playlist items with getPlaylistContents adds additional decimals to IDs #7

Open
robatosan opened this issue Nov 23, 2024 · 0 comments

Comments

@robatosan
Copy link

robatosan commented Nov 23, 2024

When performing a request like so:

Double id = 1234d;

GetPlaylistContentsResponse response = plexAPI
    .playlists()
    .getPlaylistContents(id, GetPlaylistContentsQueryParamType.Audio);

The resulting request looks like this:

// the id gets an additional decimal number
http://plex-server-address:32400/playlists/1234.0/items?type=8

From what I can see in the JSON responses, the ID (or ratingKey) is usually sent as a string and not a number in all JSON responses. I haven't tested it with other SDKs yet, but I assume that this affects Java specifically, as per default a double is converted to 1234.0 with its builtin toString method.

I guess it would be the safest to just define the ratingKey as a string and not interpret it as numeric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant