Rhapsody Control
Provides remote controls and media key support for the Rhapsody website. This is primarily designed to work with a Fluid SSB but it should also work with userscript extensions such as GreaseMonkey or TamperMonkey in supported browsers. Just be aware that the Growl notifications won't work when used in a browser.
Installation
- Setup this script in: ~/Sites/rhapsody-control
- Install the Node dependencies:
npm install
- Install Forever into your global Node modules:
npm install -g forever
- Create a symlink for the included shell script:
ln -s ~/Sites/rhapsody-control/shell-scripts/rhapsody /usr/local/sbin/rhapsody
- Download Fluid and create a SSB that points to http://app.rhapsody.com/
- Open the newly created Rhapsody app and open the Window->Userscripts menu
- Add a pattern of "*.rhapsody.com"
- Paste the contents of (js/userscript.min.js) into the text field
Usage
Start
- Start the command server:
rhapsody start
orcd ~/Sites/rhapsody-control; npm start
Commands
- Play/Pause:
rhapsody pause
orcd ~/Sites/rhapsody-control; npm run-script pause
- Previous:
rhapsody prev
orcd ~/Sites/rhapsody-control; npm run-script prev
- Next:
rhapsody next
orcd ~/Sites/rhapsody-control; npm run-script next
- Shuffle:
rhapsody shuffle
orcd ~/Sites/rhapsody-control; npm run-script shuffle
Suppress iTunes from taking over the media keys
Normally iTunes will take over the media keys on your keyboard (previous, play/pause, and next). With a music service like Rhapsody, we want to suppress this behavior so iTunes won't launch when you use the media keys.
Method #1
- Patch iTunes
- Install the iTunesPatch located here and follow the installation instructions
- Install the MediaKeysPlugin into your Rhapsody plugins folder:
- /Applications/Rhapsody.app/Contents/PlugIns/MediaKeysPlugin.fluidplugin
- Open the Rhapsody SSB and open the Window->Userscripts menu
- Add a new userscript in the left hand pane, name it "MediaKeys"
- Add a pattern of “*.rhapsody.com”
- Paste the contents of (js/mediaKeysPlugin.min.js) into the text field
- Refresh
Method #2
- Remap the media keys:
- Use a program like KeyRemap4MacBook to remap the keys like so:
- Map previous to F7
- Map play/pause to F8
- Map next to F9
- Use a macro program like Keyboard Maestro to fire the following terminal commands:
- Map the F7 key to
cd ~/Sites/rhapsody-control; npm run-script prev
- Map the F8 key to
cd ~/Sites/rhapsody-control; npm run-script pause
- Map the F9 key to
cd ~/Sites/rhapsody-control; npm run-script next
- Map the F7 key to
- Use a program like KeyRemap4MacBook to remap the keys like so: