diff --git a/convert.go b/convert.go index 168b5a6..261cd7c 100644 --- a/convert.go +++ b/convert.go @@ -69,7 +69,7 @@ func main() { } // cycle through the playlist and grab the song information - for i := 0; i < playlist_length; i++ { + for i := 0; i < (playlist_length/2)+1; i++ { // based on how the xml is formatted from itunes, it has 2 separate elements for each // key, so we need to mark when we find the key we need and say the next item is the item for _, e := range doc.FindElements("./plist/dict/dict/dict[" + strconv.Itoa(i) + "]/*") {