5

Save to Your Library is a great way to save favorite songs and play them back as a playlist later. It's also cool to make Your Library > Songs available offline on mobile. Then you're never without something good to listen to.

While listening on my desktop computer I'd like to effortlessly add the current track to my library.
Is there a keyboard shortcut to make this happen?

For reference, there was a similar feature called "Starred" with an outdated SuperUser Question here.

5 Answers 5

5

No keyboard shortcuts, let alone Save to Your Library, are built into Spotify desktop apps and probably never will. In December 2016 they marked the request (originally from 2012) as "Not Right Now".

For macOS users I don't know a solution.

For Windows users AutoHotkey is a fairly workable.

Here is an AutoHotkey script that works as of 10-30-2017.

; Control+Shift+Win+F1
^+#F1:: SendInput {Media_Play_Pause}

; Control+Shift+Win+F2
^+#F2:: SendInput {Media_Prev}

; Control+Shift+Win+F3
^+#F3:: SendInput {Media_Next}
    
; Control+Shift+Win+F4
^+#F4:: SaveSongToSpotifyLibrary()


SaveSongToSpotifyLibrary() {
    spotify := "ahk_exe spotify.exe"
    if WinExist(spotify) {
        ; Store starting window ID and mouse position.
        MouseGetPos x, y, startingWinId

        ; Activate Spotify.
        WinActivate %spotify%
        WinWaitActive %spotify%

        saveToYourLibraryIcon = %A_WorkingDir%\apps\SpotifyController\SaveToYourLibraryIcon.png
        ImageSearch FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, %saveToYourLibraryIcon%
        if (ErrorLevel = 0) {
            Click %FoundX%, %FoundY%

        } else if (ErrorLevel = 2) {
            MsgBox % "Problem conducting image search. Is the saveToYourLibraryIcon in the correct location?"

        } else if (ErrorLevel = 1) {
            MsgBox % "Unable to save song. Can't find the Add button."
        }

        ; Restore original window and mouse position.
        WinActivate ahk_id %startingWinId%
        MouseMove %x%, %y%
    }
}

Instructions

  • If you've never created a script before please see the Beginner's Tutorial.

  • This uses the ImageSearch function. I created the image-to-find by taking a screenshot of the plus button in the bottom left corner of the Spotify app.
    You can create one yourself or download this one.
    SaveToYourLibrary Icon

  • Name it SaveToYourLibraryIcon.png and place it in the same directory as your script.

  • That's it. Press Ctrl+Shift+Win+F4 (change this to whatever you want) and the active song will be added to your library!

4
  • As of April 2018, Spotify's ahk_class is now reported as Chrome_WidgetWin_1. I updated this in the above but am still unable to get it to work. Apr 8, 2018 at 2:22
  • Hi Richard. I updated to use the exe name instead of the window class. Give that a try.
    – GollyJer
    Apr 23, 2018 at 15:17
  • Thanks, I found that the window height of the spotify window was being reported incorrectly though. I opted for this hack for the moment. Apr 25, 2018 at 18:51
  • 1
    Richard, after testing a little bit I decided to remove the search area optimization section of the code. Even on a high resolution screen it's less than a second to save the song. Your code on github won't work if spotify isn't maximized.
    – GollyJer
    Apr 27, 2018 at 20:52
4

Alt + Shift + B works on Windows when Spotify is the active window.

You can check out all keyboard shortcuts by pressing Ctrl + /

1
  • 1
    Thanks for the tip on where to find shortcuts. Spotify's online official keyboard shortcuts doesn't include like - option-shift-B on Mac. With that arrow in my quiver, I can set up a hot key macro in Keyboard Maestro on Mac to like songs without leaving keyboard. Dec 7, 2021 at 2:14
0

Ctrl+Space. I found this in a very random way so...yes:>

1
  • Was excited to learn this for a minute but isn't working for me on Windows. You on Mac?
    – GollyJer
    Oct 3, 2021 at 21:48
0

On Mac, with Keyboard Maestro it's pretty easy to put together a macro to like a song from the keyboard and go back to work. Here's how the macro looks visually:

enter image description here

  1. add hot key shift-option-l
  2. create sequence: Activate Spotify
  3. pause for 1 second (some kind of pause is very important, perhaps shorter will be enough) to make sure Spotify is ready for the keyboard shortcut
  4. type the Spotify keyboard shortcut for like a song: shift-option-b (hat tip to @Hari above for pointing out where to find the shortcut)
  5. reactivate the last active application

I usually keep Spotify in half of my secondary monitor so it won't interrupt application workflow too much. I could do it in the background if there were a menu item for "like song" but there isn't.

Other Mac macro utilities or Apple Script or Automator could mostly do something similar but Keyboard Maestro is the one I use (faster to create macros, easier to build), hence my solution for using Keyboard Maestro.

0
  1. Toastyfy must be installed and set to Alt + Shift + S hotkeys to show Spotify.
  2. hotkeyP must be installed and configured to open the script by hotkey (I have 1 key, Pause/Break).
  3. The script must be copied to a text file and the extension must be changed from *.txt to *.vbs.
Set oShell = CreateObject("WScript.Shell")
oShell.SendKeys("^%{s}")
WScript.Sleep 1000
oShell.SendKeys"%+{b}"
WScript.Sleep 1000
oShell.SendKeys("^%{s}")

Now I can add likes and remove likes with one button without stopping from work, but it seems to me that the spent day was not worth it :D

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .