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

type parameter required when getting playlist items #65

Closed
robatosan opened this issue Nov 10, 2024 · 5 comments · Fixed by #66
Closed

type parameter required when getting playlist items #65

robatosan opened this issue Nov 10, 2024 · 5 comments · Fixed by #66

Comments

@robatosan
Copy link

I was trying to get the playlist items with /playlists/:id/items.

Unfortunately the type parameter is required and on top of that limited to only four types ( 1 = movie 2 = show 3 = season 4 = episode).

This makes it impossible to get e.g. audio items (type 8) by either specifying type 8 or leaving out the type parameter entirely.

@LukeHagar
Copy link
Owner

Hey is this requirement/limitation something you are seeing with the API or an SDK?

@robatosan
Copy link
Author

I've used two SDKs now (typescript & java as they come from npm/maven) and both have this restriction - I can see the reason why in the API definition.
I think removing the "required: true" statement in the type parameter definition would do the trick. I don't think it's required anywhere.

@JasonLandbridge
Copy link
Collaborator

Wild guess, but can you pass in type: 0? This should be a workaround. The type is in most cases required but adding audio, and other types should be the larger fix here. Do you happen to know what other types there are? They do seem to be global, such as audio = type 8

@robatosan
Copy link
Author

robatosan commented Nov 11, 2024

Wild guess, but can you pass in type: 0? This should be a workaround. The type is in most cases required but adding audio, and other types should be the larger fix here. Do you happen to know what other types there are? They do seem to be global, such as audio = type 8

Not sure what type: 0 means , but it's not defined as a PlexMediaType and therefore no choice in any of the SDKs I mentioned.

Also when I try it in a request on an audio playlist (/playlists/:id/items?type=0) I get an empty playlist as a result.
Only when I either specify type: 8 or no type at all, I can retrieve the items.
I found this out by trying around, so I have no idea what other types there are :)

@JasonLandbridge
Copy link
Collaborator

@robatosan I have added Audio to the mediatype, it might take a moment for it to be propegated to the various SDK's

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

Successfully merging a pull request may close this issue.

3 participants