package basic;
import com.jitcaforwin.basic.iTunesApp;
import com.jitcaforwin.basic.api.IITTrack;
import com.jitcaforwin.basic.api.IiTunes;
import com.jitcaforwin.main.exceptions.JitcaGeneralException;
public class CurrentTrackDemo {
public static void main(String args[]) {
try {
IiTunes iTunes = new iTunesApp();
IITTrack track = iTunes.getCurrentTrack();
if (track == null) {
System.out.println("Currently no track played!");
} else {
System.out.println(track.getName() + " by " + track.getArtist()
+ " is currently played. \n");
;
}
iTunes.close();
} catch (JitcaGeneralException e) {
e.printStackTrace();
}
}
}