Skip to content

Commit

Permalink
fix(extensions/bookmark): content_uri migration support (#2688)
Browse files Browse the repository at this point in the history
  • Loading branch information
Delusoire authored Dec 5, 2023
1 parent 2c0cdb4 commit 703d9fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Extensions/bookmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@
} else {
meta.description = Player.data.item.metadata.artist_name;
}
const contextUri = URI.fromString(Spicetify.Player.data.context_uri);
const playerState = Spicetify.Player.data;
const contextUri = URI.fromString(playerState.context_uri ?? playerState.context.uri);
if (contextUri && (contextUri.type === URI.Type.PLAYLIST || contextUri.type === URI.Type.PLAYLIST_V2 || contextUri.type === URI.Type.ALBUM)) {
meta.context = `/${contextUri.toURLPath()}?uid=${Player.data.item.uid}`;
}
Expand Down

0 comments on commit 703d9fc

Please sign in to comment.