Search in sources :

Example 1 with Playlist

use of com.xxmicloxx.NoteBlockAPI.model.Playlist in project Nexus by ProjectEdenGG.

the class RadioFeature method setupRadios.

private void setupRadios() {
    RadioConfigService configService = new RadioConfigService();
    RadioConfig radioConfig = configService.get0();
    for (Radio radio : radioConfig.getRadios()) {
        if (!radio.isEnabled())
            continue;
        Playlist playlist = radio.getPlaylist();
        if (playlist == null || playlist.getSongList().size() <= 0) {
            Nexus.severe(radio.getId() + " radio playlist is empty!");
            continue;
        }
        createSongPlayer(radio, playlist);
    }
    configService.save(radioConfig);
}
Also used : Playlist(com.xxmicloxx.NoteBlockAPI.model.Playlist) RadioConfigService(gg.projecteden.nexus.models.radio.RadioConfigService) RadioConfig(gg.projecteden.nexus.models.radio.RadioConfig) Radio(gg.projecteden.nexus.models.radio.RadioConfig.Radio) RadioUtils.isInRangeOfRadiusRadio(gg.projecteden.nexus.features.radio.RadioUtils.isInRangeOfRadiusRadio)

Aggregations

Playlist (com.xxmicloxx.NoteBlockAPI.model.Playlist)1 RadioUtils.isInRangeOfRadiusRadio (gg.projecteden.nexus.features.radio.RadioUtils.isInRangeOfRadiusRadio)1 RadioConfig (gg.projecteden.nexus.models.radio.RadioConfig)1 Radio (gg.projecteden.nexus.models.radio.RadioConfig.Radio)1 RadioConfigService (gg.projecteden.nexus.models.radio.RadioConfigService)1