Package extended

Source Code of extended.TracksOfArtistDemo

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();
    }
  }
}
TOP

Related Classes of extended.TracksOfArtistDemo

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.