Class RuleBasedPrefilter

    • Constructor Detail

      • RuleBasedPrefilter

        public RuleBasedPrefilter()
    • Method Detail

      • getPreFilteredSongs

        public Iterable<AudioSong> getPreFilteredSongs​(AudioSong template,
                                                       PlayList playList,
                                                       Float syncBPM,
                                                       boolean playMatchesAtSyncTempo,
                                                       Collection<ScoreRule> scoreRules,
                                                       Collection<SongFilter> mandatoryFilters)
        Returns songs from the database that roughly match the template song. The database query is executed in the Job.getDefaultJob() thread. When the executing thread is interrupted, this method returns early with an empty Iterable.
        template - template song
        playList - playlist to search in
        syncBPM - sync bpm
        playMatchesAtSyncTempo - matched songs are meant to be played at the same tempo as the template song
        scoreRules - rules
        mandatoryFilters - mandatory filter, e.g. no TV-shows @return song iterable