mirror of
https://github.com/aditya-K2/gspt.git
synced 2026-01-09 22:08:04 -05:00
Minor changes
This commit is contained in:
40
spt/auth.go
40
spt/auth.go
@@ -10,7 +10,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
sptauth "github.com/zmb3/spotify/v2/auth"
|
||||
_auth "github.com/zmb3/spotify/v2/auth"
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
"github.com/aditya-K2/utils"
|
||||
@@ -20,26 +20,26 @@ import (
|
||||
var (
|
||||
redirectURI = "http://localhost:8080/callback"
|
||||
scopes = []string{
|
||||
sptauth.ScopeUserLibraryRead,
|
||||
sptauth.ScopePlaylistModifyPublic,
|
||||
sptauth.ScopePlaylistModifyPrivate,
|
||||
sptauth.ScopePlaylistReadPrivate,
|
||||
sptauth.ScopePlaylistReadCollaborative,
|
||||
sptauth.ScopeUserReadPlaybackState,
|
||||
sptauth.ScopeUserModifyPlaybackState,
|
||||
sptauth.ScopeUserLibraryModify,
|
||||
sptauth.ScopeUserLibraryRead,
|
||||
sptauth.ScopeUserReadPrivate,
|
||||
sptauth.ScopeUserFollowRead,
|
||||
sptauth.ScopeUserReadCurrentlyPlaying,
|
||||
sptauth.ScopeUserModifyPlaybackState,
|
||||
sptauth.ScopeUserReadRecentlyPlayed,
|
||||
sptauth.ScopeUserTopRead,
|
||||
sptauth.ScopeStreaming,
|
||||
_auth.ScopeUserLibraryRead,
|
||||
_auth.ScopePlaylistModifyPublic,
|
||||
_auth.ScopePlaylistModifyPrivate,
|
||||
_auth.ScopePlaylistReadPrivate,
|
||||
_auth.ScopePlaylistReadCollaborative,
|
||||
_auth.ScopeUserReadPlaybackState,
|
||||
_auth.ScopeUserModifyPlaybackState,
|
||||
_auth.ScopeUserLibraryModify,
|
||||
_auth.ScopeUserLibraryRead,
|
||||
_auth.ScopeUserReadPrivate,
|
||||
_auth.ScopeUserFollowRead,
|
||||
_auth.ScopeUserReadCurrentlyPlaying,
|
||||
_auth.ScopeUserModifyPlaybackState,
|
||||
_auth.ScopeUserReadRecentlyPlayed,
|
||||
_auth.ScopeUserTopRead,
|
||||
_auth.ScopeStreaming,
|
||||
}
|
||||
auth = sptauth.New(
|
||||
sptauth.WithRedirectURL(redirectURI),
|
||||
sptauth.WithScopes(scopes...))
|
||||
auth = _auth.New(
|
||||
_auth.WithRedirectURL(redirectURI),
|
||||
_auth.WithScopes(scopes...))
|
||||
ch = make(chan *payload)
|
||||
state = "__GSPT_AUTH__"
|
||||
userConfigDir, userConfigErr = os.UserConfigDir()
|
||||
|
||||
Reference in New Issue
Block a user