Skip to content

Commit

Permalink
fix: skip empty track
Browse files Browse the repository at this point in the history
  • Loading branch information
Zibbp committed Dec 30, 2024
1 parent 32ea29b commit def0c41
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions convert/spotify_tidal.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ func (s *Service) SpotifyToTidal(saveMissingTracks bool, saveTidalPlaylist bool,

// loop over each spotify track to convert
for _, spotifyTrack := range spotifyTracks {
if spotifyTrack == nil {
log.Debug().Msg("skipping empty track")
continue
}

// check if track is already in playlist using db
if _, ok := dbPlaylistTrackMap[spotifyTrack.ID.String()]; ok {
log.Debug().Str("spotify_track_id", spotifyTrack.ID.String()).Str("spotify_track_name", spotifyTrack.Name).Msgf("track is already in playlist according to database")
Expand Down

0 comments on commit def0c41

Please sign in to comment.