Skip to content

Commit

Permalink
updates Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
crohrer committed May 5, 2017
1 parent f6d2661 commit ac1222e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ More on the background of this project in my [blog post](http://blog.chrisrohrer

## Demo

Currently running every 20min via cronjob on [this playlist](https://play.spotify.com/user/radiolistenerbot/playlist/6prQq7S9saObANcQOddSTh)
Currently running hourly via cronjob on [this playlist](https://play.spotify.com/user/radiolistenerbot/playlist/2G76EIk09AuL58sHI9my9V)

## Usage

Expand All @@ -17,7 +17,7 @@ Before running it on the server you need to authenticate via oAuth (as the user
You can obtain a clientId & clientSecret by [registering a new application](https://developer.spotify.com/my-applications/#!/applications).
There are some pre-defined and tested radio stations, they can be found in `station-examples.md`. You can define your own schemes, all you need is the URL of the playlist page of the station and three jQuery selectors: one for the playlist entry element, one for the title and one for the artist. Some radio stations (like FM4) have special markup that requires linear instead of nested search; this behaviour can be set with the `searchLinear` flag.
3. Run `npm install`
4. Run `node main.js`
4. Run `npm start`
5. Open the displayed URL in your browser & grant permission for your app to change your playlists. This will open a page on localhost which you can close. Now you find two new files: `accessToken` and `refreshToken`. They contain the secret information to authenticate the user with spotify, so handle with care!

This should have added the first tracks to your playlist already. Every time you run `node main.js` again, the script will check if there are new tracks that have not been added to the playlist yet.
Expand All @@ -28,7 +28,7 @@ You may want to run this on a server via cronjob every X minutes or so (dependin
2. Copy your local `accessToken` and `refreshToken` onto the server
3. Copy your local `config.json` onto the server and change the last entry to `"localEnvironment": false`
4. Run `npm install`
5. Configure your cronjob to run `node main.js` every X minutes (don't forget to change to the correct directory first!)
5. Configure your cronjob to run `node main.js` every X minutes (don't forget to change to the correct directory first! - this can be done with a bash script)

## Updates

Expand All @@ -38,7 +38,7 @@ Please note: Upgrading a Patch release (like from 2.2.0 to 2.2.1) will work with

## Contributing

If you successfully use this script for a radio station that is not listed yet in `station-examples.md`, please add that config to the examples. It might help others.
If you successfully use this script for a radio station that is not listed yet in `station-examples.md`, please open a pull request to add that config to the examples or open a new issue and I will add it. It might help others. (Don't forget to remove your clientId & clientSecret!)

If you try this script on a new radio station and something doesn't work, open an issue with a description of the problem & your radio station config (Don't forget to remove your clientId & clientSecret!). Maybe we can get it to work.

Expand Down

0 comments on commit ac1222e

Please sign in to comment.