diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24965ba7a..b2a3107db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,3 +32,7 @@ jobs: with: artifacts: Lavalink.jar allowUpdates: true + omitBodyDuringUpdate: true + omitDraftDuringUpdate: true + omitNameDuringUpdate: true + omitPrereleaseDuringUpdate: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 325ff4880..58991f959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ Each release usually includes various fixes and improvements. The most noteworthy of these, as well as any features and breaking changes, are listed here. + +## v3.7.10 +* Update lavaplayer to [`1.5.2`](https://github.com/lavalink-devs/lavaplayer/releases/tag/1.5.2) - Fixed NPE on missing author in playlist tracks in YouTube + +## 3.7.9 +* Update lavaplayer to [`1.5.1`](https://github.com/lavalink-devs/lavaplayer/releases/tag/1.5.1) - Fixed YouTube access token errors +* Fixed websocket crash when seeking and nothing is playing +* Fixed error when seeking and player is not playing anything + +## 3.7.8 +* Fix YouTube 403 errors +* Fix YouTube access token errors + ## 3.7.7 * Add JDA-NAS support for musl (`x86-64`, `aarch64`) based systems (most notably `alpine`) diff --git a/IMPLEMENTATION.md b/IMPLEMENTATION.md index ef6a76141..93b0bfba7 100644 --- a/IMPLEMENTATION.md +++ b/IMPLEMENTATION.md @@ -215,7 +215,7 @@ Dispatched every x (configurable in `application.yml`) seconds with the current #### Stats OP -A collection of stats sent every minute. +A collection of statistics sent every minute. ##### Stats Object @@ -247,11 +247,13 @@ A collection of stats sent every minute. ##### Frame Stats -| Field | Type | Description | -|---------|------|----------------------------------------| -| sent | int | The amount of frames sent to Discord | -| nulled | int | The amount of frames that were nulled | -| deficit | int | The amount of frames that were deficit | +| Field | Type | Description | +|-----------|------|----------------------------------------------------------------------| +| sent | int | The amount of frames sent to Discord | +| nulled | int | The amount of frames that were nulled | +| deficit * | int | The difference between sent frames and the expected amount of frames | + +\* The expected amount of frames is 3000 (1 every 20 ms) per player. If the `deficit` is negative, too many frames were sent, and if it's positive, not enough frames got sent.
Example Payload @@ -274,9 +276,9 @@ A collection of stats sent every minute. "lavalinkLoad": 0.5 }, "frameStats": { - "sent": 123456789, - "nulled": 123456789, - "deficit": 123456789 + "sent": 6000, + "nulled": 10, + "deficit": -3010 } } ``` diff --git a/LavalinkServer/build.gradle.kts b/LavalinkServer/build.gradle.kts index ac78f2ae9..c1f131a7b 100644 --- a/LavalinkServer/build.gradle.kts +++ b/LavalinkServer/build.gradle.kts @@ -53,7 +53,9 @@ dependencies { implementation(libs.koe.udpqueue) { exclude(module="udp-queue") } - implementation(libs.bundles.udpqueue.natives) + implementation(libs.bundles.udpqueue.natives) { + exclude(group = "com.sedmelluq", module = "lava-common") + } implementation(libs.lavaplayer) implementation(libs.lavaplayer.ip.rotator) diff --git a/LavalinkServer/src/main/java/lavalink/server/io/WebSocketHandler.kt b/LavalinkServer/src/main/java/lavalink/server/io/WebSocketHandler.kt index e79db30ca..591952c80 100644 --- a/LavalinkServer/src/main/java/lavalink/server/io/WebSocketHandler.kt +++ b/LavalinkServer/src/main/java/lavalink/server/io/WebSocketHandler.kt @@ -127,6 +127,10 @@ class WebSocketHandler( private fun seek(json: JSONObject) { val player = context.getPlayer(json.getLong("guildId")) + if (!player.isPlaying) { + log.warn("Can't seek when player is not playing anything") + return + } player.seekTo(json.getLong("position")) SocketServer.sendPlayerUpdate(context, player) } diff --git a/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt b/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt index bf7348a19..fe0e4fe92 100644 --- a/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt +++ b/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt @@ -120,8 +120,10 @@ class PlayerRestHandler( // we handle position differently for playing new tracks playerUpdate.position.takeIf { it.isPresent && !playerUpdate.encodedTrack.isPresent && !playerUpdate.identifier.isPresent } ?.let { - player.seekTo(it.value) - SocketServer.sendPlayerUpdate(context, player) + if (player.isPlaying) { + player.seekTo(it.value) + SocketServer.sendPlayerUpdate(context, player) + } } playerUpdate.endTime.takeIf { it.isPresent && !playerUpdate.encodedTrack.isPresent && !playerUpdate.identifier.isPresent } diff --git a/README.md b/README.md index c7b305b9b..83d623c47 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Lavalink logo -A standalone audio sending node based on [Lavaplayer](https://github.com/sedmelluq/lavaplayer) and [Koe](https://github.com/KyokoBot/koe). +A standalone audio sending node based on [Lavaplayer](https://github.com/lavalink-devs/lavaplayer) and [Koe](https://github.com/KyokoBot/koe). Allows for sending audio without it ever reaching any of your shards. Being used in production by FredBoat, Dyno, LewdBot, and more. @@ -236,7 +236,7 @@ LOGGING_LOGBACK_ROLLINGPOLICY_MAX_HISTORY ### Binary -Download binaries from the [Download Server](https://repo.arbjerg.dev/artifacts/lavalink/), [GitHub releases](https://github.com/lavalink-devs/Lavalink/releases) (specific versions prior to `v3.5` can be found in the [CI Server](https://ci.fredboat.com/viewLog.html?buildId=lastSuccessful&buildTypeId=Lavalink_Build&tab=artifacts&guest=1)) or [GitHub actions](https://github.com/lavalink-devs/Lavalink/actions). +Download binaries from the [Download Server](https://repo.lavalink.dev/artifacts/lavalink/), [GitHub releases](https://github.com/lavalink-devs/Lavalink/releases) (specific versions prior to `v3.5` can be found in the [CI Server](https://ci.fredboat.com/viewLog.html?buildId=lastSuccessful&buildTypeId=Lavalink_Build&tab=artifacts&guest=1)) or [GitHub actions](https://github.com/lavalink-devs/Lavalink/actions). Put an `application.yml` file in your working directory. ([Example here](LavalinkServer/application.yml.example)) diff --git a/build.gradle.kts b/build.gradle.kts index 834b3dd58..3d4b90afe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,7 +28,7 @@ allprojects { mavenCentral() // main maven repo mavenLocal() // useful for developing maven("https://m2.dv8tion.net/releases") - maven("https://maven.arbjerg.dev/releases") + maven("https://maven.lavalink.dev/releases") jcenter() maven("https://jitpack.io") // build projects directly from GitHub } diff --git a/repositories.gradle b/repositories.gradle index 7280cc431..77ad8b14a 100644 --- a/repositories.gradle +++ b/repositories.gradle @@ -24,8 +24,8 @@ publishing { if (findProperty("MAVEN_USERNAME") != null && findProperty("MAVEN_PASSWORD") != null) { println("Publishing to Maven Repo") repositories { - def snapshots = "https://maven.arbjerg.dev/snapshots" - def releases = "https://maven.arbjerg.dev/releases" + def snapshots = "https://maven.lavalink.dev/snapshots" + def releases = "https://maven.lavalink.dev/releases" maven { url = version.endsWith("SNAPSHOT") ? snapshots : releases diff --git a/settings.gradle.kts b/settings.gradle.kts index 50e44236b..70763745b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -38,10 +38,10 @@ fun VersionCatalogBuilder.spring() { } fun VersionCatalogBuilder.voice() { - version("lavaplayer", "1.4.2") + version("lavaplayer", "1.5.2") - library("lavaplayer", "com.github.walkyst.lavaplayer-fork", "lavaplayer").versionRef("lavaplayer") - library("lavaplayer-ip-rotator", "com.github.walkyst.lavaplayer-fork", "lavaplayer-ext-youtube-rotator").versionRef("lavaplayer") + library("lavaplayer", "dev.arbjerg", "lavaplayer").versionRef("lavaplayer") + library("lavaplayer-ip-rotator", "dev.arbjerg", "lavaplayer-ext-youtube-rotator").versionRef("lavaplayer") library("lavadsp", "dev.arbjerg", "lavadsp").version("0.7.8") library("koe", "moe.kyokobot.koe", "core").version("2.0.0-rc1")