* @throws JitcaException
* if an error occurs.
*/
public static Playlist createPlaylist(boolean lazy, Source source, IITPlaylist itPlaylist) {
try{
ITPlaylistKind kind = itPlaylist.getKind();
if (kind.is(ITPlaylistKind.CD())) {
return new AudioCDPlaylistImpl(source, (IITAudioCDPlaylist) itPlaylist);
} else if (kind.is(ITPlaylistKind.User())) {
return UserPlaylistImpl.createUserPlaylist(lazy, (UserLibrary) source, (IITUserPlaylist) itPlaylist);
} else {
return new PlaylistImpl(lazy, source, itPlaylist);
}
} catch (PlaylistDeletedException e){