* @throws JitcaException
* if an error occurs.
*/
public static UserPlaylist createUserPlaylist(boolean lazy, UserLibrary library, IITUserPlaylist itPlaylist) {
try {
ITUserPlaylistSpecialKind specialKind = ((IITUserPlaylist) itPlaylist).getSpecialKind();
if (specialKind.is(ITUserPlaylistSpecialKind.Folder())) {
return new PlaylistFolderImpl(lazy, library, itPlaylist);
} else {
if (itPlaylist.isSmart()) {
return new SmartPlaylistImpl(lazy, library, itPlaylist);
} else {