Skip to content

Latest commit

 

History

History
56 lines (47 loc) · 1.83 KB

README.md

File metadata and controls

56 lines (47 loc) · 1.83 KB

Spotify Controller

Spotify Controller is an app that allows you to control the Spotify desktop app via keybinds.

Spotify Controller does this using the Spotify API. The app is created using ElectronJS and React.

Screenshots

App

Getting started

Installing dependencies

npm install

Setting up Spotify API credentials

Create config.js in /src/utils with the following format :

const cfg = {
  clientid: '<your-spotify-api-client-id>',
  redirectUri: '<your-redirect-webpage-url>'
}

export default cfg

Creating a redirection page

Create a webpage that opens the Spotify Controller app upon redirection from the Spotify OAuth login screen using custom URL Protocol.

🔗 Example

Starting the app in development mode

Start the Vite server

npm run dev

Start the electron app

npm start

Building the app

Building the Vite React app

npm run build

Changing the link notations

Change all src or hrefs from / to ./ notation in /dist/index.html.
Example - /assets/icon.ico to ./assets/icon.ico.

Changing the app URL in the Electron app

Replace win.loadURL('http://localhost:5173/') in the createWindow function in main.js with win.loadFile('./dist/index.html').

Pack the Electron app

Building the app requires @electron/packager

npx @electron/packager . --overwrite --icon=./public/icon.ico