mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 01:15:55 +03:00
[PR #207] [MERGED] filter out unplayable/unavailable tracks #664
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#664
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/aome510/spotify-player/pull/207
Author: @rileyallyn
Created: 6/2/2023
Status: ✅ Merged
Merged: 9/4/2023
Merged by: @aome510
Base:
master← Head:feat/mark-unavailable📝 Commits (6)
4399804feat: first pass on marking tracks unavailable or unplayable8527375feat: refactor internal_call and paging code in order to support query payloads1d9256dfix: better unicode icon for unplayable musicee0e9fafeat: make unavailable tracks unplayable7f1ac3dMerge branch 'master' into feat/mark-unavailableb7d936afilter out unplayable tracks📊 Changes
2 files changed (+74 additions, -41 deletions)
View changed files
📝
spotify_player/src/client/mod.rs(+50 -25)📝
spotify_player/src/state/model.rs(+24 -16)📄 Description
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
marketquery parameter and usingfrom_tokento retrieve the user's country code from their token.A track is filtered out if its
is_playableisfalse.This did require a non significant refactor with the functions that call
internal_calland 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.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.