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