fixed optimization slightly

This commit is contained in:
2020-08-31 15:38:48 -05:00
parent 93b5fa8ce3
commit 206156f907

View File

@@ -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) + "]/*") {