Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Copy to clipboard#9

Open
JoelBrenstrum wants to merge 3 commits intonickthegroot:masterfrom
JoelBrenstrum:copy-to-clipboard
Open

Copy to clipboard#9
JoelBrenstrum wants to merge 3 commits intonickthegroot:masterfrom
JoelBrenstrum:copy-to-clipboard

Conversation

@JoelBrenstrum
Copy link

No description provided.

Copy link
Owner

@nickthegroot nickthegroot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I had no clue getting the track URL was supported. There's a few changes I'd like to have before merging, but once they get done I can push up a new version with these changes.

`${this._track.title} - ${this._track.artist} \n ${gMusicResult.value}`,
'Copy URL to clipboard'
)
.then(() => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still copys the URL even if the user clicks (X).
Instead of requesting user input, just copy the URL to the clipboard then let the user know the operation was successful.

case 'time':
break
default:
console.log(gMusicChannel.channel)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's not a lot of reason to log unsupported channels without context... it adds unnecessary clutter to the console. Let's take it out.

let skipCommand = commands.registerCommand('gmusic.skip', () => {
gMusic.forward()
})

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the line breaks consistant. For commands, I'd like to keep them without.

},
{
"command": "gmusic.getTrackURL",
"title": "Get Current Track URL",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're changing the command to not require interacting with the information box, let's change the title to Copy Track URL to Clipboard.

@JoelBrenstrum
Copy link
Author

I will have a look at fixing this up when i get a chance! Yea you can actually call any function inside gmusic.js or gmusic-ui.js. I was originally trying to add a feature to add the current playing song to a playlist, but gmusic-ui currently lacks the functionality.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants