Skip to content

Commit 79e4ac6

Browse files
committed
add headers before retrieving auth
1 parent f557b71 commit 79e4ac6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ func (cfg *Config) systemSetup() { // Verifies variables and does setup
194194
if (cfg.Creds.User == "" && cfg.Creds.Password == "") {
195195
log.Fatal("USER and/or PASSWORD variable not set, exiting")
196196
}
197+
cfg.Creds.plexHeader() // Adds client headers
197198
cfg.Creds.getPlexAuth()
198-
cfg.Creds.PlexHeader() // Adds client headers
199199
cfg.getPlexLibrary()
200200
default:
201201
log.Fatalf("system: %s not known, please use a supported system (jellyfin, mpd, subsonic or plex)", cfg.System)

src/plex.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ type PlexPlaylist struct {
9999
} `json:"MediaContainer"`
100100
}
101101

102-
func (cfg *Credentials) PlexHeader() {
102+
func (cfg *Credentials) plexHeader() {
103103
cfg.Headers = make(map[string]string)
104104

105105
cfg.Headers["X-Plex-Client-Identifier"] = "explo"

0 commit comments

Comments
 (0)