-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: master
Are you sure you want to change the base?
Copy to clipboard #9
Conversation
There was a problem hiding this 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(() => { |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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() | |||
}) | |||
|
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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
.
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. |
No description provided.