Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy to clipboard #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

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.

@@ -13,9 +13,15 @@ export function activate(context: ExtensionContext) {
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.

@@ -63,6 +63,11 @@
"icon": "src/assets/back.png",
"category": "Google Play Music"
},
{
"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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants