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

Attempting to play blocked song prevents resuming current displayed song #211

Closed
Xevion opened this issue Jun 23, 2023 · 2 comments · Fixed by #207
Closed

Attempting to play blocked song prevents resuming current displayed song #211

Xevion opened this issue Jun 23, 2023 · 2 comments · Fixed by #207
Labels
bug Something isn't working

Comments

@Xevion
Copy link

Xevion commented Jun 23, 2023

Describe the bug
If you attempt to play a blocked song (it's grayed out in the official Spotify interfaces), it won't play. It won't update the interface, it will simply stop whatever you're playing currently. However, the progress bar may continue.

To Reproduce

  1. Play a blocked song while another song is 'active' (playing or not).
  2. Attempt to unpause and continue the current song.

Expected behavior
The current song should resume no matter what song was attempted prior. Better, the interface should update and shown that no song is currently playing.

Log and backtrace
spotify-player-23-06-23-16:02.log

Screenshots
image
I attempted to play 'Bookbag' but the interface remains unchanged. Also not shown in the screenshot is the progress bar progressing normally, despite nothing playing.

Environment

  • OS: Pop!_OS 22.04 LTS
  • Application version: 0.12.1
@Xevion Xevion added the bug Something isn't working label Jun 23, 2023
@aome510
Copy link
Owner

aome510 commented Jun 24, 2023

Related: #158. Look like this issue should also be fixed with #207.

@rileyallyn do you have any updates on the PR or do you have any helps with that?

@aome510
Copy link
Owner

aome510 commented Jun 24, 2023

Ideally, unavailable/blocked/unplayable songs should be filtered out from the UI, so such confusion should not happen.

aome510 pushed a commit that referenced this issue Sep 4, 2023
Resolves #158.
Resolves #211.

The purpose of this PR is to filter out unavailable songs. This functionality is achieved by utilizing Spotify's song relinking feature, specifically by sending the `market` query parameter and using `from_token` to retrieve the user's country code from their token.

A track is filtered out if its `is_playable` is `false`.

This did require a non significant refactor with the functions that call ``internal_call`` and the various internal pagination functions. But by making a "generic" payload field allows for more flexibility in the future if Spotify adds more query params.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants