Spotify 的桌面应用程序中是否有“保存到您的图书馆”的键盘快捷键?

Gol*_*Jer 3 spotify

Save to Your Library是保存最喜欢的歌曲并稍后作为播放列表播放的好方法。Your Library > Songs在移动设备上离线使用也很酷。那么你永远不会没有好听的东西。

在我的台式电脑上收听时,我想毫不费力地将当前曲目添加到我的音乐库中。
是否有键盘快捷键可以实现这一点?

作为参考,这里有一个名为“Starred”的类似功能以及一个过时的超级用户问题

Gol*_*Jer 5

没有键盘快捷键,更不用说Save to Your Library,内置在 Spotify 桌面应用程序中,而且可能永远不会。2016 年 12 月,他们将请求(最初来自 2012 年)标记为“Not Right Now”。

对于 macOS 用户,我不知道解决方案。

对于 Windows 用户来说AutoHotkey是一个相当可行的。

这是一个自 2017 年 10 月 30 日起有效的 AutoHotkey 脚本。

; 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%
    }
}
Run Code Online (Sandbox Code Playgroud)

指示

  • 如果您之前从未创建过脚本,请参阅初学者教程

  • 这将使用ImageSearch功能。我通过截取 Spotify 应用左下角加号按钮的屏幕截图来创建要查找的图像。
    您可以自己创建一个或下载这个。
    SaveToYourLibrary 图标

  • 为其命名并将其SaveToYourLibraryIcon.png放置在与脚本相同的目录中。

  • 就是这样。按Ctrl+Shift+Win+F4将此更改为您想要的任何内容),活动歌曲将添加到您的音乐库中!