Examples of IITUserPlaylist


Examples of com.jitcaforwin.basic.api.IITUserPlaylist

      IITTrackCollection selectedTracks = iTunes.getSelectedTracks();

      if (selectedTracks == null) {
        System.out.println("No tracks selected!");
      } else {
        IITUserPlaylist newPlaylist = iTunes.createPlaylist(
            "SelectedTracks").getUserPlaylist();

        boolean hasNext = true;
        int i = 1;

        while (hasNext) {
          IITTrack track = selectedTracks.item(i);
          if (track == null) {
            hasNext = false;
          } else {
            System.out.println(track.getName() + " by "
                + track.getArtist() + " added to playlist.");
            newPlaylist.addTrack(track);
            i++;
          }
        }

        double sizeMB = newPlaylist.getSize() / 1000000;
        String duration = newPlaylist.getTime();
        String name = newPlaylist.getName();

        System.out.println("Playlist \"" + name
            + "\" created. \nSize of the playlist: " + sizeMB
            + "MB. \nDuration of playlist: " + duration);
      }
View Full Code Here

Examples of com.jitcaforwin.basic.api.IITUserPlaylist

      IITTrackCollection selectedTracks = iTunes.getSelectedTracks();

      if (selectedTracks == null) {
        System.out.println("No tracks selected!");
      } else {
        IITUserPlaylist newPlaylist = iTunes.createPlaylist(
            "SelectedTracks").getUserPlaylist();

        boolean hasNext = true;
        int i = 1;

        while (hasNext) {
          IITTrack track = selectedTracks.item(i);
          if (track == null) {
            hasNext = false;
          } else {
            System.out.println(track.getName() + " by "
                + track.getArtist() + " added to playlist.");
            newPlaylist.addTrack(track);
            i++;
          }
        }

        double sizeMB = newPlaylist.getSize() / 1000000;
        String duration = newPlaylist.getTime();
        String name = newPlaylist.getName();

        System.out.println("Playlist \"" + name
            + "\" created. \nSize of the playlist: " + sizeMB
            + "MB. \nDuration of playlist: " + duration);
      }
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.