private void handleSelectTrack ( EventModel eventModel , ResourceModel < String > resourceModel ) { Optional < TrackInfo > trackInfo = TrackInfoResource . getTrackInfo ( eventModel ) ; if ( ! trackInfo . isPresent ( ) ) { musicHelper . playerError ( PlayerError . ERROR_ILLEGAL + "command: " + resourceModel . getResource ( ) + "missing resource" , resourceModel . getProvider ( ) ) ; } selectTrack . accept ( trackInfo . get ( ) ) ; }
handles the select Track command