Spotify Control API ~ Written in bash, using curl.
***
-## Setup
-1. Go to the [developer dashboard](https://developer.spotify.com/dashboard/applications) and create a new app.
-2. Remember the `Client ID` and the `Client Secret`\
-2a. Open settings and add `http://localhost:5000/` to the redircet_uri whitelist
-> You can optionally edit `app.patch` to change the scopes, note that doing this can break somethings.
-> > You shouldn't mess with the patches unless you understand JS (`app.patch`) and HTML (`index.patch`)
-3. `./setup.sh`
----
-
-# Musl
-Those on musl won't be able to run `./setup` as it requires nodejs to be installed, which isn't yet compatible with musl libc...\
-But Spotbash can still be used from musl, the user just has to create `$HOME/.cache/spotbash/authkeys`\
-```
-$ cat authkeys
-REKEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-CLID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-CLSEC=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-```
-The client ID and secret can be found in set 1 of [Setup](#Setup)\
-While REKEY is a bit harder to get... And requires a browser and server to make a request to Spotifys API\
-Spotify then returns the Auth key, and a Refresh key, the Refresh key is used to request new Auth keys since the expire 1 hour after being created\
-[REKEY](https://www.thatgeekyweeb.is-dummy-thi.cc/REKEY/), can be used to get the `REKEY`
-## Usage
-1. `./spotbash help`
-```text
-Spotbash: Spotify Control API ~ Written in bash ~ By ThatGeekyWeeb (Mia)
-Usage: spotbash:
-[auth|device|search_*|play_track|*_volume|get_info|pre|trans|skip|pause|resume|loop|repeat|state|set|play*|*left|shuffle*]
-***
-auth: Print $AUTHKEY and exit
-device: Print first device ID and exit
-devices: List ALL devices and exit
-search_play: Search for "arg2" and play
-search_track: Search for "arg2" and output URI & Artist & name | "arg2" is interpreted as a track
-search_album: Seach for "arg2" and output URI, Artist, & name | "arg2" is interpreted as a album
-play_track: Play URI
-get_volume: Output player volume and exit
-set_volume: Set player volume to "arg2" and exit
-get_info: Get debugging info about currently playing device
-pre: Change playback to previous song
-trans: Transfer playback to "arg2" | arg2 must be DeviceID | Uses device func if "arg2" is empty
-skip: Change playback to next song
-pause: Pause playback
-resume: Resume playback
-loop: Loop track
-repeat: Repeat current album/playlist
-state: Output playback status and exit
-repeat_off: Disable loop/repeat
-repeat_state: Output playback repeat status and exit
-set: Move playback to "arg2" | "arg2" must be a device ID
-playlists: Output list of users playlists and exit
-play: Play "arg2" | "arg2" must be Album or Playlist URI
-playing: Print Song name followed by artist and exit
-left: Print time left in MS (exact) and exit
-minleft: Print time left in Mins (approximate) and exit
-shuffle: Enable/Disable Shuffle | Set to "arg2" if specified
-shuffle_state: Print state of shuffle and exit
-***
-"arg2" Usage:
- <"arg2">
-IE: search_play "Man of The Year"
-NOTE: Use qoutes!
-***
-```
-***
-potbash is a "Control API" which means it only controls the Spotify playback of devices.
+## Installation
+1. Head [here (`https://developer.spotify.com/dashboard/applications`)](https://developer.spotify.com/dashboard/applications)
+ - Create or use and existing app
+ - Remember it's Client ID and Client Secret
+ - Edit it's settings to add `http://www.thatgeekyweeb.is-dummy-thi.cc/REKEY/callback/` and `https://www.thatgeekyweeb.is-dummy-thi.cc/REKEY/callback/` as callback URI's (`HTTP` & `HTTPS`)
+2. Head to [REKEY (`https://www.thatgeekyweeb.is-dummy-thi.cc/REKEY/`)](https://www.thatgeekyweeb.is-dummy-thi.cc/REKEY/)
+ - Press start and input the requested data
+3. Click "`Click to save AUTHKEYS`" and save to `~/.cache/spotbash/authkeys`
diff --git a/app.patch b/app.patch
deleted file mode 100644
index e8bca76..0000000
--- a/app.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff --git a/authorization_code/app.js b/authorization_code/app.js
-index 8a1634a..f6d88b3 100644
---- a/authorization_code/app.js
-+++ b/authorization_code/app.js
-@@ -9,13 +9,14 @@
-
- const express = require("express"); // Express web server framework
- const axios = require("axios");
--const cors = require("cors");
- const querystring = require("querystring");
- const cookieParser = require("cookie-parser");
-+/// CORS breaks, like everything I try to do browser side
-+/// So, no more CORS + It doesn't matter, since this is a opensource project, and it's up to the user to protect their client_secret
-
--const client_id = "CLIENT_ID"; // Your client id
--const client_secret = "CLIENT_SECRET"; // Your secret
--const redirect_uri = "REDIRECT_URI"; // Your redirect uri
-+const client_id = 'id'; // Your client id
-+const client_secret = 'sec'; // Your secret
-+const redirect_uri = 'http://localhost:5000/callback'; // Your redirect uri
-
- /**
- * Generates a random string containing numbers and letters
-@@ -39,15 +40,15 @@ const app = express();
-
- app
- .use(express.static(__dirname + "/public"))
-- .use(cors())
- .use(cookieParser());
-+// Again, no more CORS
-
- app.get("/login", function(req, res) {
- let state = generateRandomString(16);
- res.cookie(stateKey, state);
-
- // your application requests authorization
-- let scope = "user-read-private user-read-email";
-+ let scope = 'user-read-private user-read-email user-library-read playlist-modify-private user-read-currently-playing user-modify-playback-state playlist-read-collaborative user-read-playback-state streaming playlist-read-private';
- res.redirect(
- "https://accounts.spotify.com/authorize?" +
- querystring.stringify({
-@@ -99,12 +100,14 @@ app.get("/callback", function(req, res) {
- res.redirect(
- "/#" + querystring.stringify({ access_token, refresh_token })
- );
-+ console.log('REKEY=' + refresh_token);
- })
- .catch(e => {
- res.redirect(
- "/#" + querystring.stringify({ error: e.response.data })
- );
- });
-+ // I removed the function from here, as it has 0 effect on the Playback SDK, and is 100% useless
- })
- .catch(e => console.error(e.response.data));
- }
-@@ -137,6 +140,4 @@ app.get("/refresh_token", function(req, res) {
- console.error(e.response.data);
- });
- });
--
--console.log("Listening on 8888");
--app.listen(8888);
-+app.listen(5000);
diff --git a/index.patch b/index.patch
deleted file mode 100644
index ec84891..0000000
--- a/index.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-diff --git a/authorization_code/public/index.html b/authorization_code/public/index.html
-index 9c57f1c..ebb4fa9 100644
---- a/authorization_code/public/index.html
-+++ b/authorization_code/public/index.html
-@@ -1,8 +1,9 @@
-
-
-
-- Example of the Authorization Code flow with Spotify
-+ Spotbash Playback SDK
-
-+
-
-
-
-
-