Skip to content

Commit

Permalink
add: removeFromQueue support Local track, album URI
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhas committed Mar 19, 2019
1 parent a375a93 commit 8ed1f51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/preprocess/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,12 @@ this.getAlbumTracks && this.removeTracksFromQueue && (Spicetify.removeFromQueue
return;
}
if (uriObj.type === Spicetify.URI.Type.ALBUM) {
if (uriObj.type === Spicetify.URI.Type.ALBUM || uriObj.type === Spicetify.URI.Type.LOCAL_ALBUM) {
const tracks = await getAlbumAsync(inputUri);
tracks.forEach((trackUri) => {
Spicetify.Queue.next_tracks.forEach((t, i) => t.uri == trackUri && indices.add(i))
})
} else if (uriObj.type === Spicetify.URI.Type.TRACK || uriObj.type === Spicetify.URI.Type.EPISODE) {
} else if (uriObj.type === Spicetify.URI.Type.TRACK || uriObj.type === Spicetify.URI.Type.EPISODE || uriObj.type === Spicetify.URI.Type.LOCAL) {
Spicetify.Queue.next_tracks.forEach((t, i) => t.uri == inputUri && indices.add(i))
} else {
console.error("Only Album, Track and Episode URIs are accepted. Skipped ", inputUri);
Expand Down

0 comments on commit 8ed1f51

Please sign in to comment.