Garry's Mod

Garry's Mod

131 ratings
Gmod Spotify Integration
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Movie
File Size
Posted
Updated
64.218 KB
30 Sep, 2020 @ 11:06am
27 Oct, 2020 @ 7:46am
4 Change Notes ( view )

Subscribe to download
Gmod Spotify Integration

Description
Introduction

What does this addon do?

This addon is meant as a controller for your Spotify desktop-app inside Garry's Mod. (Mostly for people who have no media keys on their keyboards). A Spotify Premium account is nedded.

Console Commands
Spotify_RunWindow: Opens the GUI Spotify_Pause: Pauses/Plays the current track Spotify_Next: Skips the current track Spotify_Previous: Returns to the previous track
All available commands can allso be found in the TTT2 key bindings menu

Set up
Alternative tutorial with pictures[imgur.com]

Go to the Spotify developer dashboard [developer.spotify.com] and click "create an app". Follow the instructions until you have access to both client id and client secret of your app. Copy those for later. All thats left to do is to click on "edit settings" inside your app. Add the website "https://henotu.github.io" to the "Redirect URIs". Now follow the instructions inside Garry's mod. (Open the GUI inside gmod with Spotify_RunWindow)

As ulx superadmin on a server you can store your client id and client secret inside the settings menu for people on your server (so they don't have to register a spotify app)

Note: The client id and Client secret are both stored as plain text. People with malicious intent could easily access these keys.

Common Bugs & fixes
[gmod-spotify-integration] addons/gmod-spotify-integration/lua/autorun/client/cl_main.lua:189: attempt to index local 'tbl' (a nil value) 1. unknown - addons/gmod-spotify-integration/lua/autorun/client/cl_main.lua:189
Solutions:
  • Is Spotify playing on your computer? If not, start something
  • Try restarting Spotify

{ "error" : { "status" : 403, "message" : "Player command failed: Restriction violated", "reason" : "UNKNOWN" } }
Possible Solutions:
  • You tried to skip to the previous track which doesn't exist

Github
You can find this addon on Github[github.com].
22 Comments
ilikegarrysmod 19 Jun @ 2:21pm 
when i try to authenticate it just says invalid client
Aspen Willow 16 May @ 5:05am 
Could this be made to only work when in a vehicle?
sqworm 6 Mar @ 8:39pm 
Why does it rq premium? Just curious
Shydun24 10 Aug, 2024 @ 6:54am 
you are quite possibly the greatest person who's ever lived
kaymo 14 May, 2021 @ 4:59pm 
wtf... spotify still poo poo
Henotu  [author] 14 May, 2021 @ 6:17am 
@TSGAMEMING™ Not that I'm aware of
TSGAMEMING 14 May, 2021 @ 1:05am 
It's Dead ?
Alucard 19 Feb, 2021 @ 7:15pm 
Hey i'm having the same issue as Dexit when setting up the controller it says "to authorize click here" it doesn't do anything it had me login but then it just sits on a black screen so i think what Dexit was trying to say is the link may be broken
kaymo 29 Nov, 2020 @ 1:03am 
wtf spotify poo poo
Henotu  [author] 20 Nov, 2020 @ 12:50am 
@Kruzgi which file do you mean?