Skip to content

Commit

Permalink
fix: use Spicetify.Player.data.item (#2676)
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetTechuila authored Nov 23, 2023
1 parent 9515069 commit 47f2afd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CustomApps/lyrics-plus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ class LyricsContainer extends react.Component {
this.tryServices(nextInfo, this.state.explicitMode);
};

if (Spicetify.Player?.data?.track) {
if (Spicetify.Player?.data?.item) {
this.state.explicitMode = this.state.lockMode;
this.currentTrackUri = Spicetify.Player.data.item.uri;
this.fetchLyrics(Spicetify.Player.data.item, this.state.explicitMode);
Expand Down
4 changes: 2 additions & 2 deletions Extensions/trashbin.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,11 @@
if (!list[uri]) {
list[uri] = true;
if (shouldSkipCurrentTrack(uri, type)) Spicetify.Player.next();
Spicetify.Player.data?.track.uri === uri && setWidgetState(true);
Spicetify.Player.data?.item.uri === uri && setWidgetState(true);
Spicetify.showNotification(type === Spicetify.URI.Type.TRACK ? "Song added to trashbin" : "Artist added to trashbin");
} else {
delete list[uri];
Spicetify.Player.data?.track.uri === uri && setWidgetState(false);
Spicetify.Player.data?.item.uri === uri && setWidgetState(false);
Spicetify.showNotification(type === Spicetify.URI.Type.TRACK ? "Song removed from trashbin" : "Artist removed from trashbin");
}

Expand Down

0 comments on commit 47f2afd

Please sign in to comment.