Examples of IJitcaITunesController


Examples of com.jitcaforwin.extended.api.IJitcaITunesController

public class CDDemo {

  public static void main(String[] args) {
    try {
      IJitcaITunesController iTunes = new JitcaiTunesController(true);

      CD cd = iTunes.getCD();

      if (cd == null) {
        if (iTunes.getCDs() != null) {
          System.out.println("More than one CD is available!");
        } else {
          System.out.println("No CD available!");
        }
      } else {
        System.out.println("Start playing: " + cd.getTitle());
        cd.play();
      }

      iTunes.close();

    } catch (JitcaException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of com.jitcaforwin.extended.api.IJitcaITunesController

public class TracksLastPlayedDemo {
 
  public static void main(String args[]){
    System.out.println("Note: The following operations could take a while for large libraries.");
    IJitcaITunesController iTunes = new JitcaiTunesController(true);
   
    TrackCollection tracksLastPlayed = iTunes.getTrackController().lastPlayed(10);
   
    System.out.println("The following tracks were played recently:");
    for (Track track : tracksLastPlayed){
      System.out.println("\"" + track.getTitle() + "\" (" + track.getAlbum() + ")");
    }
   
    final long millisecondsOfDay = 24 * 60 * 60 * 1000;
    TrackCollection tracksPlayedToday = iTunes.getTrackController().lastPlayed(new JitcaDate(new Date(System.currentTimeMillis()-millisecondsOfDay)));
   
    System.out.println("The following tracks were played during the last 24 hours:");
    for (Track track : tracksPlayedToday){
      System.out.println("\"" + track.getTitle() + "\" (" + track.getAlbum() + ")");
    }
   
    iTunes.close();
  }
View Full Code Here
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.