ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Syncing iTunes
Subject:   Great idea, one problem
Date:   2005-06-20 13:28:59
From:   chixulub
Response to: Great idea, one problem

Hm. Good question :).


The following is line # 434 in MyTunesLibrary.java (where the exception is thrown):


t.setSize(new Integer((String) track.get("Size")).intValue());


So we're coming across a song that doesn't have its "Size" attribute specified (is it an internet radio stream?). This can be fixed by changing the line to:


if (track.containsKey("Kind")) {
t.setSize(new Integer((String) track.get("Size")).intValue());
}


If you have any problems let me know; I'll see if we can't put up a new zip file for downloading to prevent this from happening in the future. Sorry about the mixup!


1 to 1 of 1
1 to 1 of 1