-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
1,078 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.inv | ||
*.min.css | ||
*.min.js* | ||
*.out.css | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
=============================== | ||
Installing ``gmusicprocurator`` | ||
=============================== | ||
============ | ||
Installation | ||
============ | ||
|
||
Requirements | ||
------------ | ||
|
@@ -10,6 +10,7 @@ Backend | |
|
||
* Python 2.7 (only tested with CPython) | ||
* virtualenv (optional, but recommended) | ||
* git (some packages are only installable via version control) | ||
|
||
Frontend | ||
~~~~~~~~ | ||
|
@@ -26,25 +27,74 @@ Frontend | |
Browser | ||
~~~~~~~ | ||
|
||
Any web browser which `supports the HTML5 audio element`_ is supported. | ||
Any web browser which `supports the HTML5 audio element`_ is supported, except | ||
IE9, due to the layout CSS. | ||
|
||
.. _supports the HTML5 audio element: http://caniuse.com/audio | ||
|
||
Instructions | ||
------------ | ||
|
||
These instructions are similar to the quick installation in ``README.rst``. | ||
This is meant as a supplement, so that the HTML5 frontend is installed | ||
correctly. | ||
|
||
.. code-block:: console | ||
$ git clone --recursive https://github.com/malept/gmusicprocurator.git | ||
$ cd gmusicprocurator | ||
$ bower install -p # Added for frontend installation | ||
$ virtualenv venv # Added for creating a separate virtualenv | ||
$ source venv/bin/activate | ||
(venv) $ pip install -r requirements.txt | ||
(venv) $ python -m gmusicprocurator list_devices --no-desktop | ||
# See quick install in README.rst | ||
(venv) $ python -m gmusicprocurator runserver | ||
Create a config file. The location depends on the OS where you're installing | ||
this app: | ||
|
||
OS X: | ||
``~/Library/Application Support/gmusicapi/gmusicprocurator.cfg`` | ||
Linux: | ||
``~/.config/gmusicapi/gmusicprocurator.cfg`` | ||
Windows: | ||
*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: | ||
|
||
.. code-block:: python | ||
GACCOUNT_EMAIL = '[email protected]' | ||
GACCOUNT_PASSWORD = 'my-password' | ||
Then run the following (lines that start with ``#`` are comments, not commands): | ||
|
||
.. code-block:: shell-session | ||
# Get the code | ||
user@host:Code$ git clone --recursive https://github.com/malept/gmusicprocurator.git | ||
user@host:Code$ cd gmusicprocurator | ||
# Create a new virtual | ||
user@host:gmusicprocurator$ virtualenv venv | ||
user@host:gmusicprocurator$ source venv/bin/activate | ||
(venv)user@host:gmusicprocurator$ pip install -r requirements.txt | ||
(venv)user@host:gmusicprocurator$ python -m gmusicprocurator list_devices --no-desktop | ||
The last command will print out a list of mobile devices that are registered | ||
with Google Music. Select one of them and add the following to the config file | ||
from above (substituting ``REPLACE_ME`` with the ID, which is after the colon | ||
in the device ID printout): | ||
|
||
.. code-block:: python | ||
GACCOUNT_DEVICE_ID = 'REPLACE_ME' | ||
Once the config file is saved, the server can be started. | ||
|
||
.. code-block:: shell-session | ||
(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 | ||
``http://localhost:5000/playlists/$PLAYLIST_ID``, replacing ``$PLAYLIST_ID`` | ||
with the proper playlist ID. | ||
|
||
Frontend-specific | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
If you want to run the frontend as well, run the following before you start the | ||
server: | ||
|
||
.. code-block:: shell-session | ||
(venv)user@host:gmusicprocurator$ bower install -p |
Oops, something went wrong.