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

implement podcast functionality #552

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

SebRollen
Copy link
Contributor

@SebRollen SebRollen commented Aug 22, 2024

Work-in-progress implementation of podcasts. Still needs quite a bit of work, but this is a large change so I thought I'd open it up in draft mode in case anyone has any comments along the way.

Playback is working for podcast episodes, as is searching for specific episodes. But the playback is still not being populated—in the process of tracking down why that isn't happening now

Fixes #359
Fixes #457

Checklist (based on #457 (comment))

  • Search
    • Shows (podcasts)
    • Episodes (podcast episodes)
  • Context menu
    • Shows
      • Copy link
      • Follow
    • Episodes
      • Go to show
      • Copy link
      • Add to playlist
      • Add to queue
  • Show detail page
  • Playback
    • Play audio
    • Show playback status

Screenshots

Search page
Screenshot 2024-08-22 at 10 14 06 PM

Show detail page
Screenshot 2024-08-22 at 11 05 13 PM

match self {
Self::Context(context_id, offset) => Self::Context(context_id.clone(), offset.clone()),
Self::URIs(playable_ids, offset) => Self::URIs(
playable_ids.into_iter().map(|x| x.clone_static()).collect(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a lot of painful places like this throughout the diff where things would be easier if PlayableId had impl Clone. Will open a PR against rspotify to see if that could be added

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines 40 to 41
AddTrackToQueue(TrackId<'static>),
AddEpisodeToQueue(EpisodeId<'static>),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would love to combine these into a AddItemToQueue(PlayableId<'static>), but can't do that yet as PlayableId doesn't impl Debug or Clone

@SebRollen SebRollen changed the title implement basic episode functionality implement podcast functionality Aug 23, 2024
@Adoni5
Copy link

Adoni5 commented Aug 27, 2024

Anything I can do to help? I would love this feature!

@SebRollen
Copy link
Contributor Author

Anything I can do to help? I would love this feature!

The biggest outstanding "unknown" is why the playback screen is still blank after starting playback for an episode, so any help diagnosing this would be fantastic.

The info in #359 may be helpful here. I was hopeful that updating streaming.rs to handle episode player events would fix it, but no dice so far.

In general, I'm probably gonna be a bit short on time to be able to push this PR forward this week, but should have more time next week.

@SebRollen SebRollen marked this pull request as ready for review September 8, 2024 02:49
@SebRollen
Copy link
Contributor Author

This pull-request is already going to be a doozy to review, so I figured I should open it up for a first look now.

Most of the functionality outlined in #457 is implemented here, save one very important part: rendering the currently playing episode in the Player UI. I've been trying to debug why the playing episode does not show up there, but haven't had too much luck yet. I know that playback.item in https://github.com/aome510/spotify-player/pull/552/files#diff-3ee6f331c585285645123ea35a2b8ad7db4d450994a9429b78c4856c6531c410R19 returns None even when an episode is playing, but as far as I can tell, item is set by Spotify itself, so I'm not sure why it's not Some(PlayableItem::Episode). Would appreciate help in debugging this

@SebRollen
Copy link
Contributor Author

Lots of errors in CI. I've been testing without enabling features—will update the PR to account for the various features as well

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.

Podcast Support Empty UI when playing a podcast episode
2 participants