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

Allow PlaylistItem to contain episodes. #194

Merged
merged 4 commits into from
Mar 10, 2021

Conversation

kstep
Copy link
Contributor

@kstep kstep commented Mar 9, 2021

Description

It's a change for meta-issue #127: "Allow PlaylistTrack/PlaylistItem to contain episodes."

Motivation and Context

According to meta-issue #127 and official docs, PlaylistItem object can have either FullTrack or FullEpisode object as a value of the track field.
Hence the fix.

Dependencies

Update docs and changelog.

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Run a full test suite.


This change is Reviewable

@kstep
Copy link
Contributor Author

kstep commented Mar 9, 2021

As a first version, I just changed the PlaylistItem::track field type to Option<PlayingItem>.
It's not the best solution, as it renders the PlayingItem type name imperfect for its function. It should be either renamed (please advise on the better name), or a new type should be introduced. I don't like the introduction of a new type, as it will be just a duplicate of the PlayingItem type, which is not DRY at all.

@marioortizmanero
Copy link
Collaborator

Why is PlayingItem's name imperfect? Both a track and an episode are playable types.

@kstep
Copy link
Contributor Author

kstep commented Mar 10, 2021

Because if the item is part of PlaylistItem, it is not necessary playing at this point in time, as it is implied by the type name ("playing item"), but it's definitely playable. If you think it's OK, then we can go on with this PR.

@marioortizmanero
Copy link
Collaborator

Ahh okay. Perhaps just PlayableItem?

@kstep
Copy link
Contributor Author

kstep commented Mar 10, 2021

Renamed PlayingItem to PlayableItem and updated the changelog.

@marioortizmanero marioortizmanero merged commit 0b2d444 into ramsayleung:master Mar 10, 2021
@marioortizmanero marioortizmanero mentioned this pull request Mar 10, 2021
87 tasks
@marioortizmanero
Copy link
Collaborator

Merged and updated the meta-issue.

@kstep kstep deleted the playlist-item-episodes branch March 11, 2021 06:51
reishoku added a commit to reishoku/spotify-tui that referenced this pull request Apr 23, 2022
see ramsayleung/rspotify#194 for details.

Signed-off-by: KOSHIKAWA Kenichi <reishoku.misc@pm.me>
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

Successfully merging this pull request may close these issues.

None yet

2 participants