Spicetify-stuff icon indicating copy to clipboard operation
Spicetify-stuff copied to clipboard

[Feature Request]: Ability to right click on song title to bring up the context menu for it.

Open DawarTheDastardly opened this issue 1 year ago • 3 comments

Choose the extension for feature request.

Full Screen Mode

📝 Provide a description of the new feature

I think it'd be great to have the ability to right click on the song title or the album title since otherwise it is a bit annoying to add songs to playlists and whatnot.

➕ Additional Information

Example:

image

DawarTheDastardly avatar Apr 29 '23 17:04 DawarTheDastardly

Yeah, would love to add this, always open for contributions via pull requests, if you have the knowledge and time!

Btw how did you create this image, is this just a concept design, or did you do some workaround to add it?

daksh2k avatar May 02 '23 14:05 daksh2k

I just used a photo editor to paste the menu onto the the screenshot and put a white line under the text.

DawarTheDastardly avatar May 03 '23 02:05 DawarTheDastardly

To implement this, first you need this component: image You can access it in V3 using:

const TrackMenu = S.webpack.exportedFunctions.find(f => f.toString().includes("canSwitchVisuals") && f.toString().includes("isSmartRecommendation"))

Then you need to wrap your title's component in a

<ContextMenu menu={<TrackMenu {...trackMenuProps} />} >
    <YourComponentGoesHere />
</ContextMenu>

with trackMenuProps being:

const playerState = Platform.getPlayerAPI().getState()
const trackMenuProps = {
    context: playerState.context,
    item: playerState.item
}

Delusoire avatar May 08 '24 01:05 Delusoire