Skip to content

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

@robatosan

Description

@robatosan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions