|
@@ -331,7 +331,7 @@ func (app *App) AutomateSection(title string) error {
|
331
|
331
|
if len(tracks) > 0 && (err != nil || !reflect.DeepEqual(currentTracks, tracks)) {
|
332
|
332
|
|
333
|
333
|
if playlistID == "" {
|
334
|
|
-
|
|
334
|
+ log.Println("Creating new playlist")
|
335
|
335
|
info, err := app.spotify.client.CreatePlaylistForUser(app.credentials.SpotifyUser, title+" "+section.title, true)
|
336
|
336
|
if err != nil {
|
337
|
337
|
log.Println("Error creating playlist to Spotify")
|
|
@@ -341,6 +341,7 @@ func (app *App) AutomateSection(title string) error {
|
341
|
341
|
changedWikiText = appendPlaylist(changedWikiText, info)
|
342
|
342
|
message = message + fmt.Sprintf("Added link to Spotify playlist for week %d.", weekNumber)
|
343
|
343
|
}
|
|
344
|
+ log.Printf("Updating playlist %s for %s with tracks %s\n", playlistID, app.credentials.SpotifyUser, tracks)
|
344
|
345
|
err := app.spotify.client.ReplacePlaylistTracks(app.credentials.SpotifyUser, playlistID, tracks...)
|
345
|
346
|
if err != nil {
|
346
|
347
|
log.Println("Error updating playlist to Spotify")
|