package de.yannicpunktdee.yoshibot.audio;

import com.sedmelluq.discord.lavaplayer.player.AudioLoadResultHandler;
import com.sedmelluq.discord.lavaplayer.tools.FriendlyException;
import com.sedmelluq.discord.lavaplayer.track.AudioPlaylist;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;

import de.yannicpunktdee.yoshibot.main.YoshiBot;
import de.yannicpunktdee.yoshibot.utils.Logger;

public class AudioLoadResultHandlerImpl implements AudioLoadResultHandler {
	
	@Override
	public void trackLoaded(AudioTrack track) {
		YoshiBot.getInstance().audioPlayer.playTrack(track);
	}
	
	@Override
	public void playlistLoaded(AudioPlaylist playlist) {
		Logger.logWarning("Aktuell kann noch keine Playlist abgespielt werden.");
	}
	
	@Override
	public void noMatches() {
		Logger.logError("Nothing found");
	}
	
	@Override
	public void loadFailed(FriendlyException exception) {
		Logger.logError("Loading failed");
	}
	
}
