Remove Lavaplayer and migrate to Lavalink
Replaced the bot's audio handling system by removing Lavaplayer dependencies and migrating to a Lavalink v4 node. Updated `MusicManager`, `TrackScheduler`, and related classes to utilize the `LavalinkClient`. Refactored playlist and track loading logic, task integrations, and event dispatch to integrate with the remote node. Deprecated the custom Udio source, preserving references for a future plugin port. Documented configuration and deployment details for the new audio architecture.
This commit is contained in:
1 parent
01bfe22d22
commit
4cf7c47645
34 files changed
+1187
-479
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package me.bobert.netneutrality.music.source;
|
||||
/*
|
||||
* Copyright (c) anthorob
|
||||
*
|
||||
* https://discord.gg/qUa6zNFZsd
|
||||
*/
|
||||
|
||||
import com.sedmelluq.discord.lavaplayer.track.AudioItem;
|
||||
import com.sedmelluq.discord.lavaplayer.track.AudioReference;
|
||||
import com.sedmelluq.discord.lavaplayer.track.AudioTrackInfo;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
|
||||
public class UdioAudioSourceManagerTest {
|
||||
|
||||
@Test
|
||||
public void loadItem() {
|
||||
AudioReference reference = new AudioReference("https://www.udio.com/songs/eNmZxqpMt9MRrjFUgYDgyi", null);
|
||||
|
||||
UdioAudioSourceManager udioAudioSourceManager = new UdioAudioSourceManager();
|
||||
AudioItem loaded = udioAudioSourceManager.loadItem(null, reference);
|
||||
|
||||
assertNotNull(loaded);
|
||||
|
||||
UdioAudioTrack audioTrack = (UdioAudioTrack) loaded;
|
||||
AudioTrackInfo info = audioTrack.getInfo();
|
||||
|
||||
assertNotNull(info);
|
||||
|
||||
assertNotNull(info.artworkUrl);
|
||||
|
||||
String artworkOptions = "width=3840,quality=75";
|
||||
assertTrue(info.artworkUrl.contains(artworkOptions));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user