Minor changes

This commit is contained in:
aditya-K2
2023-05-17 02:39:24 +05:30
parent 42de34b07e
commit ae64e023ed

View File

@@ -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()