add hotkey to copy url of currently playing track#156
Conversation
|
it seems like some library dependency for |
Rigellute
left a comment
There was a problem hiding this comment.
Great work! This is a nice feature that I've often wanted.
Left a few comments about implementation, but looks good 👍 .
Perhaps in the future we could throw up a selection menu that lets the user pick which link they'd like to copy - track/album/playlist/artist
Not sure what's wrong with CI, will investigate.
|
|
||
| app.spotify = Some(spotify); | ||
|
|
||
| app.clipboard_context = |
There was a problem hiding this comment.
Could/should the clipboard_context be initialised in app.rs? Or is it easier to handle the error from main?
There was a problem hiding this comment.
Problem is that currently app initialization cannot fail. If we make it failable we will have to adjust every test. That would touch almost every file, so I refrained from doing so
| } | ||
|
|
||
| pub fn copy_song_url(&mut self) { | ||
| let clipboard = match &mut self.clipboard_context { |
There was a problem hiding this comment.
Looks like this could be using an if let?
if let Some(clipboard_context) = &mut self.clipboard_context {
...
}There was a problem hiding this comment.
I used an "early return" here to save an indentation level, do you want me to change it?:)
|
regarding the ci runner: I think the |
|
Going to merge this into a side branch so I can test CI/CD fix you suggested |
Hey,
first of all: Awesome project!
I implemented a new feature that copies the url of the currently playing track when you press a button (
cby default).This is my first time using rust, so if you find any mistakes or weirdness, let me know and I will fix the issues.
I hope I found all the relevant sections I needed to adjust.