tombonez / noTunes

A simple macOS application that will prevent iTunes or Apple Music from launching.
MIT License
3.56k stars 59 forks source link

Set YouTube Music as default music player? #42

Closed merchako closed 11 months ago

merchako commented 11 months ago

In the Readme, you give instructions on how to set an alternative application as the default music player. Unfortunately, YouTube Music doesn't have an application—it's a URL. Could you indicate whether it's possible to set a webapp as the default music player and, if so, how?

merchako commented 11 months ago

I've tried a URL

defaults write digital.twisted.noTunes "https://music.youtube.com"
2023-10-04 18:01:42.412 defaults[70463:2212317]
Rep argument is not a dictionary
Defaults have not been changed.

and I've tried calling a script that calls a URL

defaults write digital.twisted.noTunes ~/Library/Mobile\ Documents/com\~apple\~ScriptEditor2/Documents/Open\ YouTube\ Music.scpt
2023-10-04 18:01:48.218 defaults[70516:2212509]
Rep argument is not a dictionary
Defaults have not been changed.

where the script is

tell application "Arc"
    make new tab with properties {URL:"https://music.youtube.com"}
    activate
end tell
tombonez commented 11 months ago

Hi @merchako,

You were almost correct in your original attempt, you just needed to remove the quotes: defaults write digital.twisted.noTunes replacement https://music.youtube.com

I'll get this added to the README now.

Any problems just let me know 🙂