Skip to content

Commit

Permalink
fixed parameter values
Browse files Browse the repository at this point in the history
  • Loading branch information
LumePart committed Jan 1, 2025
1 parent 8ae65a7 commit ddfad7d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/plex.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func addToPlexPlaylist(cfg Config, playlistID, machineID string, tracks []Track)
}

func updatePlexPlaylist(cfg Config, PlaylistID, summary string) error {
params := fmt.Sprintf("/playlists/%s?summary=%s", PlaylistID, summary)
params := fmt.Sprintf("%s?summary=%s", PlaylistID, summary)

if _, err := makeRequest("PUT", cfg.URL+params, nil, cfg.Creds.Headers); err != nil {
return err
Expand All @@ -325,9 +325,8 @@ func updatePlexPlaylist(cfg Config, PlaylistID, summary string) error {
}

func deletePlexPlaylist(cfg Config, playlistKey string) error {
params := fmt.Sprintf("/playlists/%s", playlistKey)

if _, err := makeRequest("DELETE", cfg.URL+params, nil, cfg.Creds.Headers); err != nil {
if _, err := makeRequest("DELETE", cfg.URL+playlistKey, nil, cfg.Creds.Headers); err != nil {
return fmt.Errorf("deletePlexPlaylist(): failed to delete plex playlist: %s", err.Error())
}
return nil
Expand Down

0 comments on commit ddfad7d

Please sign in to comment.