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

Update PlexMediaTypeString to match PlexMediaType #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/models/common/PlexMediaTypeString.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ enum:
- show
- season
- episode
- artist
- album
- track
example: "movie"
description: |
The type of media content
Expand All @@ -12,3 +15,6 @@ x-speakeasy-enums:
- TV_SHOW
- SEASON
- EPISODE
- AUDIO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- AUDIO
- ARTIST

@angafirith Should this not be ARTIST?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the late response.

I believe AUDIO is correct because that's the value used in src/models/common/PlexMediaType.yaml. I think the primary thing here is that these values need to be in alignment with each other. (i.e. the string value in the response needs to map to the same x-speakeasy-enum value as the int value in the request).

I have to admit that I'm not entirely sure here, since I haven't had the chance to figure out how to regenerate the go module using the updated API spec. I figured out these values by manually editing the source of that module, but there could be some nuance here that I am missing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at it again, it should be ARTIST, since this will be the enum value that corresponds with artist as a string value. The order here matters, as with the other options. If you change it, I will merge it

- ALBUM
- TRACK
Loading