* @throws JitcaException
* if an error occurs.
*/
public TrackCollection getTracksOfGenre(String genre){
try{JLogger.debug(SearchService.class, "loadTracksOfGenre() for \"" + genre + "\"");
TrackCollection tracks = this.createTrackCollection(this.itPlaylist.search(genre, ITPlaylistSearchField.All()));
TrackCollection tracksCleaned = new TrackCollection(this.source);
for (Track track : tracks) {
if (track.getGenre().equals(genre)) {
tracksCleaned.add(track);
}
}
return tracksCleaned;
} catch (PlaylistDeletedException e) {
throw new ITObjectDeletedError(this.source);