Files
netneutrality/docs/reference/udio-lavalink-plugin/UdioAudioSourceManagerTest.java
T
anthorob 4cf7c47645 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.
2026-09-23 15:08:06 -04:00

40 lines
1.1 KiB
Java

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));
}
}