- Python 2.7 (only tested with CPython)
- virtualenv (optional, but recommended)
- git (some packages are only installable via version control)
Create a config file. The location depends on the OS where you’re installing this app:
- OS X:
- If you want to use this on Windows, let me know. I have no idea whether it will work correctly.
The contents of the file will look like this:
GACCOUNT_EMAIL = 'firstname.lastname@example.org'
Then run the following (lines that start with
# are comments, not commands):
# Get the code user@host:Code$ git clone https://github.com/malept/gmusicprocurator.git user@host:Code$ cd gmusicprocurator # Create a new virtual environment user@host:gmusicprocurator$ virtualenv venv user@host:gmusicprocurator$ source venv/bin/activate (venv)user@host:gmusicprocurator$ pip install -r requirements.txt # Only run the next line if you wish to use libsass-python instead of the # Ruby version of Sass: (venv)user@host:gmusicprocurator$ pip install libsass (venv)user@host:gmusicprocurator$ python -m gmusicprocurator set_password
The last command will activate an interactive prompt that will store your Google account password (or, if your account has two-factor authentication enabled, your application-specific password) into the operating system’s password storage service.
Once your password is set, you will need to associate GMusicProcurator with one of your mobile devices. Run the following command to list the devices:
(venv)user@host:gmusicprocurator$ python -m gmusicprocurator list_devices --no-desktop
Select one of them and add the following to the config file from above
REPLACE_ME with the ID, which is after the colon in the
device ID printout):
GACCOUNT_DEVICE_ID = 'REPLACE_ME'
If you do not want to run the frontend, add the following to the config file:
GMP_FRONTEND_ENABLED = False
Once the config file is saved, the server can be started.
(venv)user@host:gmusicprocurator$ python -m gmusicprocurator runserver
By default, it runs at
localhost:5000. For assistance on how to change
these settings, run
python -m gmusicprocurator runserver --help.
Currently, the proxy assumes that you know the playlist ID. You can access the
(XSPF) playlist in the media player of your choice via the URL
with the proper playlist ID.
If you want to run the frontend as well, run the following before starting the server:
(venv)user@host:gmusicprocurator$ npm install --production (venv)user@host:gmusicprocurator$ node_modules/.bin/bower install -p