package extended;
import com.jitcaforwin.extended.JitcaiTunesController;
import com.jitcaforwin.extended.api.IJitcaITunesController;
import com.jitcaforwin.extended.api.UserLibrary;
import com.jitcaforwin.extended.api.track.Artist;
import com.jitcaforwin.extended.api.track.Track;
import com.jitcaforwin.extended.collections.TrackCollection;
import com.jitcaforwin.main.exceptions.JitcaException;
public class TracksOfArtistDemo {
public static void main(String args[]){
try {
//BasicConfigurator.configure();
IJitcaITunesController iTunes = new JitcaiTunesController(true);
UserLibrary library = iTunes.getLibrary();
Artist michaelJackson = library.getArtist("Michael Jackson");
michaelJackson.loadAllTracks();
TrackCollection tracks = michaelJackson.getTracks();
System.out.println("The following tracks of \"" + michaelJackson.getName() + "\" are in your library:");
for (Track track : tracks){
System.out.println("\"" + track.getTitle() + "\" (" + track.getAlbum() + ")");
}
iTunes.close();
} catch (JitcaException e) {
e.printStackTrace();
}
}
}