Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Remove many features in light of new Spotify "Add to playlist" menu
Browse files Browse the repository at this point in the history
  • Loading branch information
duffey committed Jan 19, 2024
1 parent 6d88d02 commit 7c629ce
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 210 deletions.
4 changes: 2 additions & 2 deletions dist/spicetify-playlist-labels.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 1 addition & 18 deletions src/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,4 @@ export async function getContents() {
export async function getPlaylistItems(uri) {
const result = await Spicetify.Platform.PlaylistAPI.getContents(uri)
return result.items;
}

export async function getPlaylistColor(imageUri) {
const { fetchExtractedColors } = Spicetify.GraphQL.Definitions;
try {
const data = await Spicetify.GraphQL.Request(
fetchExtractedColors,
{ uris: [imageUri] },
);
return data.data?.extractedColors?.[0];
} catch (error) {
return null;
}
}

export async function removeTrackFromPlaylist(playlistUri, trackUri) {
await Spicetify.Platform.PlaylistAPI.remove(playlistUri, [{ uri: trackUri, uid: "" }]);
}
}
4 changes: 3 additions & 1 deletion src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

.spicetify-playlist-labels-label-container {
position: relative;
height: 28px;
height: 24px;
}

.spicetify-playlist-labels-label-container > img {
width: 24px;
height: 100%;
object-fit: cover;
border-radius: 2px;
}
Loading

0 comments on commit 7c629ce

Please sign in to comment.