Skip to content
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

Music Decoy to launch another app (Spotify) is not working #6

Open
tomglynch opened this issue Jan 29, 2025 · 3 comments
Open

Music Decoy to launch another app (Spotify) is not working #6

tomglynch opened this issue Jan 29, 2025 · 3 comments

Comments

@tomglynch
Copy link

I’m trying to use Music Decoy to redirect the Play button to launch Spotify instead of Apple Music. However, despite following the instructions and verifying the configuration, Spotify does not launch or play when I press the Play button.

Steps to Reproduce

  1. Installed Music Decoy via Homebrew:

    brew install music-decoy

    and moved it to /Applications.

  2. Set the mediaAppPath to Spotify using the following command:

    defaults write com.apple.MusicDecoy mediaAppPath /Applications/Spotify.app
  3. Verified the configuration by running:

    defaults read com.apple.MusicDecoy mediaAppPath

    Output: /Applications/Spotify.app

  4. Ensured Music Decoy is running (confirmed via Activity Monitor).

  5. Pressed the Play button, but Spotify does not launch or play. Instead, the Music app icon bounces but does not open.

Debugging Steps

Tested Spotify with AppleScript:

Ran the following command in Script Editor:

tell application "Spotify" to play

Result: Spotify launched and started playing successfully. This confirms Spotify is scriptable and can receive AppleEvents.

Checked Permissions:

Granted Music Decoy and Spotify the following permissions in System Settings > Privacy & Security:

  • Accessibility
  • Full Disk Access

However, I could not change the Automation settings in System Settings.

Ran Music Decoy in Terminal:

Launched Music Decoy from the Terminal to observe logs:

/Applications/Music\ Decoy.app/Contents/MacOS/Music\ Decoy

Pressed the Play button, but no errors or logs were displayed.

Tested with Another App:

Set the mediaAppPath to VLC:

defaults write com.apple.MusicDecoy mediaAppPath /Applications/VLC.app

Result: VLC did not launch when pressing the Play button.

Recreated the Preference File:

Deleted the preference file and reconfigured Music Decoy:

rm ~/Library/Preferences/com.apple.MusicDecoy.plist
defaults write com.apple.MusicDecoy mediaAppPath /Applications/Spotify.app

Result: No change in behavior.

Expected Behavior

When pressing the Play button, Music Decoy should:

  • Prevent Apple Music from launching.
  • Launch Spotify (if not already running).
  • Send a "play" command to Spotify.

Actual Behavior

  • Apple Music does not launch (as expected).
  • Spotify does not launch or play.
  • No errors or logs are displayed.

System Information

  • macOS Version: macOS Sequoia 15.2
  • Device: MacBook Pro 16-inch (Nov 2024), Apple M4 Pro, 24 GB RAM
  • Music Decoy Version: v1.1 (installed via Homebrew)
  • Spotify Version: Spotify for macOS (Apple Silicon) 1.2.55.235.g5eaa0904

Additional Context

The issue persists even after reinstalling Music Decoy and Spotify.

Let me know if you need further details or logs to debug this issue. Thanks for maintaining this useful tool!

@alin23
Copy link
Contributor

alin23 commented Jan 29, 2025

I just tested this again and it works as expected: when play is pressed, Spotify is launched (might need to press it twice after the first MusicDecoy launch)

The event doesn't also send play to Spotify like you do in AppleScript, it just launches it. From that point, play events will be routed by the system to Spotify or whatever app is in Now Playing.

Try doing a:

brew uninstall --cask --zap music-decoy
brew reinstall --force music-decoy

That's what I tested to get a clean slate and it works.

EDIT: do also make sure the system Music app is not running

@xvaier
Copy link

xvaier commented Feb 4, 2025

I just want to add that I observe exactly the same behaviour using the same MacOS version, almost the same laptop and with Spotify for macOS (Apple Silicon) 1.2.56.502.ga68d2d4f. I tried installing using homebrew and also downloading directly from the Music decoy website.

@tomglynch
Copy link
Author

tomglynch commented Feb 4, 2025

@xvaier interesting you're using a similar laptop.

@alin23 Thanks for the response -

I've tried

brew uninstall --cask --zap music-decoy
brew reinstall --force music-decoy

But even after doing and repeating the install instructions i'm still having the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants