|
|
@ -56,7 +56,7 @@ public final class Chords extends ListenerAdapter |
|
|
|
private final Downloader downloader; |
|
|
|
private final Downloader downloader; |
|
|
|
private final Searcher searcher; |
|
|
|
private final Searcher searcher; |
|
|
|
private final QueueManager queueManager; |
|
|
|
private final QueueManager queueManager; |
|
|
|
private Recommender recommender; |
|
|
|
// private Recommender recommender;
|
|
|
|
private JDA jda; |
|
|
|
private JDA jda; |
|
|
|
|
|
|
|
|
|
|
|
private final Map<String, Command> commands = new HashMap<>(); |
|
|
|
private final Map<String, Command> commands = new HashMap<>(); |
|
|
@ -356,15 +356,15 @@ public final class Chords extends ListenerAdapter |
|
|
|
|
|
|
|
|
|
|
|
public void setRecommenderEnabled(boolean enabled) |
|
|
|
public void setRecommenderEnabled(boolean enabled) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (recommender == null && enabled) |
|
|
|
// if (recommender == null && enabled)
|
|
|
|
{ |
|
|
|
// {
|
|
|
|
recommender = new Recommender(); |
|
|
|
//// recommender = new Recommender();
|
|
|
|
downloader.addSource(recommender); |
|
|
|
// downloader.addSource(recommender);
|
|
|
|
} else if (recommender != null && !enabled) |
|
|
|
// } else if (recommender != null && !enabled)
|
|
|
|
{ |
|
|
|
// {
|
|
|
|
downloader.removeSource(recommender); |
|
|
|
//// downloader.removeSource(recommender);
|
|
|
|
recommender = null; |
|
|
|
// recommender = null;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public MusicHandler getMusicHandler() |
|
|
|
public MusicHandler getMusicHandler() |
|
|
@ -427,10 +427,10 @@ public final class Chords extends ListenerAdapter |
|
|
|
return playlists; |
|
|
|
return playlists; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Recommender getRecommender() |
|
|
|
// public Recommender getRecommender()
|
|
|
|
{ |
|
|
|
// {
|
|
|
|
return recommender; |
|
|
|
// return recommender;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
private class DownloaderMessageHandler implements BiConsumer<TrackRequest, Exception> |
|
|
|
private class DownloaderMessageHandler implements BiConsumer<TrackRequest, Exception> |
|
|
|
{ |
|
|
|
{ |
|
|
@ -514,8 +514,8 @@ public final class Chords extends ListenerAdapter |
|
|
|
else |
|
|
|
else |
|
|
|
jda.getPresence().setActivity(null); |
|
|
|
jda.getPresence().setActivity(null); |
|
|
|
|
|
|
|
|
|
|
|
if (recommender != null) |
|
|
|
// if (recommender != null)
|
|
|
|
recommender.addSeed(track); |
|
|
|
// recommender.addSeed(track);
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|