raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.23k stars 2.93k forks source link

[Music] "Add to Library" doesn't add to Library #13708

Open alexschcom opened 1 month ago

alexschcom commented 1 month ago

Extension

https://www.raycast.com/fedevitaledev/music

Raycast Version

1.79.1

macOS Version

14.5

Description

When playing a song that's not in my Library and I run the "Add to Library" command, it does bring up a toast message saying "Added to Library", but it did in fact not :(

Steps To Reproduce

  1. Play a song in Apple Music that's not in your Library
  2. Run "Add to Library"

Current Behaviour

No response

Expected Behaviour

No response

raycastbot commented 1 month ago

Thank you for opening this issue!

🔔 @Rawnly @peterdev22 @danpalmer @octoxan @Shpigford @urwrstkn8mare you might want to have a look.

💡 Author and Contributors commands The author and contributors of `fedevitaledev/music` can trigger bot actions by commenting: - `@raycastbot close this issue` Closes the issue. - `@raycastbot rename this issue to "Awesome new title"` Renames the issue. - `@raycastbot reopen this issue` Reopens the issue. - `@raycastbot assign me` Assigns yourself to the issue. - `@raycastbot good first issue` Adds the "Good first issue" label to the issue. - `@raycastbot keep this issue open` Make sure the issue won't go stale and will be kept open by the bot.
rawnly commented 1 month ago

Hey @alexschcom thanks for reporting, i need your help to debug this. Can you please run in the terminal the following command and post here the output?

osascript -e 'tell application "Music" to get name of source 1'

Below a little explanation of how the command "add to library" works:

We use applescript to control the Music application. This for sure has some limitations. The add to library command as you can see in the code tries to add the current track to source 1 and if it fails tries to retrieve the library name and retry duplicating the track to the playlist $libraryName. This happens because in the past the command was just duplicate current track to library playlist "Library" but i discovered then that the Library is localized so it worked only for OS with language set to EN.

Which version of macOS are you running?

alexschcom commented 1 month ago

Hey @rawnly -- the command returns Library (I am using my Mac in English). And I'm running macOS 14.5