diff --git a/LavalinkServer/build.gradle.kts b/LavalinkServer/build.gradle.kts
index ddb62b35a..f50b43195 100644
--- a/LavalinkServer/build.gradle.kts
+++ b/LavalinkServer/build.gradle.kts
@@ -65,11 +65,12 @@ dependencies {
implementation(libs.kotlin.reflect)
implementation(libs.logback)
implementation(libs.sentry.logback)
+ implementation(libs.semver)
implementation(libs.oshi) {
// This version of SLF4J does not recognise Logback 1.2.3
exclude(group = "org.slf4j", module = "slf4j-api")
}
-
+
testImplementation(libs.spring.boot.test)
}
diff --git a/LavalinkServer/src/main/java/lavalink/server/bootstrap/PluginManager.kt b/LavalinkServer/src/main/java/lavalink/server/bootstrap/PluginManager.kt
index c3ed4cb73..be432ae2d 100644
--- a/LavalinkServer/src/main/java/lavalink/server/bootstrap/PluginManager.kt
+++ b/LavalinkServer/src/main/java/lavalink/server/bootstrap/PluginManager.kt
@@ -9,9 +9,11 @@ import java.io.FileOutputStream
import java.io.InputStream
import java.net.URL
import java.net.URLClassLoader
+import java.net.HttpURLConnection
import java.nio.channels.Channels
import java.util.*
import java.util.jar.JarFile
+import io.github.z4kn4fein.semver.toVersion
@SpringBootApplication
class PluginManager(val config: PluginsConfig) {
@@ -83,6 +85,37 @@ class PluginManager(val config: PluginsConfig) {
val file = File(directory, declaration.canonicalJarName)
downloadJar(file, url)
}
+
+ checkPluginForUpdates(declaration)
+ }
+ }
+
+ private fun checkPluginForUpdates(declaration: Declaration) {
+ val splitPath = declaration.url.split('/')
+
+ val baseSplitPath = splitPath.dropLast(2)
+ val basePath = baseSplitPath.joinToString("/") + "/maven-metadata.xml"
+
+ val connection = URL(basePath).openConnection() as HttpURLConnection
+ connection.inputStream.bufferedReader().use {
+ val lines = it.readLines()
+ for (line in lines) {
+ val regex = "(.*?)".toRegex()
+ val match = regex.find(line)
+ val latest = match?.groups?.get(1)?.value
+ if (latest != null) {
+ val latestVersion = latest.toVersion()
+ val currentVersion = declaration.version.toVersion()
+
+ if(latestVersion > currentVersion) {
+ log.warn("A newer version of ${declaration.name} was found: $latestVersion. " +
+ "The current version is $currentVersion.")
+ } else {
+ log.info("Plugin ${declaration.name} is up to date")
+ }
+ break
+ }
+ }
}
}
diff --git a/docs/api/rest.md b/docs/api/rest.md
index 27daf6930..4f94fdd59 100644
--- a/docs/api/rest.md
+++ b/docs/api/rest.md
@@ -751,7 +751,7 @@ When `identifier` is used, Lavalink will try to resolve the identifier as a sing
Response:
-[Player](#Player) object
+[Player](#player) object
Example Payload
diff --git a/docs/changelog/v3.md b/docs/changelog/v3.md
index 0e2c009ed..aa9a3bfbe 100644
--- a/docs/changelog/v3.md
+++ b/docs/changelog/v3.md
@@ -1,10 +1,17 @@
+## v3.7.13
+!!! danger
+ This is the last Lavalink `v3` release, see [here](https://github.com/lavalink-devs/Lavalink/discussions/1100) for more info.
+
+* Updated Lavaplayer to [`1.5.6`](https://github.com/lavalink-devs/lavaplayer/releases/tag/1.5.6)
+* Updated koe to [`2.0.3-rc2`](https://github.com/KyokoBot/koe/releases/tag/2.0.3-rc2) & use voice gateway v8 in [#1098](https://github.com/lavalink-devs/Lavalink/pull/1098)
+
## v3.7.12
* Updated Lavaplayer to [`1.5.4`](https://github.com/lavalink-devs/lavaplayer/releases/tag/1.5.4)
* Updated Koe to [`2.0.1`](https://github.com/KyokoBot/koe/releases/tag/2.0.1) (fixes the `IndexOutOfBoundsException` when playing a YouTube track)
!!! warning
- The default Youtube source is now deprecated and won't receive further updates. Please use https://github.com/lavalink-devs/youtube-source#plugin instead.
+ The default Youtube source is now deprecated and won't receive further updates. Please use https://github.com/lavalink-devs/youtube-source#plugin instead.
## v3.7.11
* Fixed not being able to seek when player is paused
@@ -42,7 +49,7 @@
!!! info
- Lavalink Docker images are now found in the GitHub Container Registry instead of DockerHub
+ Lavalink Docker images are now found in the GitHub Container Registry instead of DockerHub
## v3.7.4
diff --git a/docs/changelog/v4.md b/docs/changelog/v4.md
index 0c2ed346f..4b9e755ab 100644
--- a/docs/changelog/v4.md
+++ b/docs/changelog/v4.md
@@ -1,3 +1,9 @@
+## v4.0.8
+* Updated koe to [`2.0.3-rc2`](https://github.com/KyokoBot/koe/releases/tag/2.0.3-rc2) & use voice gateway `v8` in [#1097](https://github.com/lavalink-devs/Lavalink/pull/1097)
+* Updated Lavaplayer to [`2.2.2`](https://github.com/lavalink-devs/lavaplayer/releases/tag/2.2.2) in [#1105](https://github.com/lavalink-devs/Lavalink/pull/1105)
+* Allow usage of non-allocating frame buffers in [#1095](https://github.com/lavalink-devs/Lavalink/pull/1095)
+* Added shutdown handling to close sessions cleanly in [#1102](https://github.com/lavalink-devs/Lavalink/pull/1102)
+
## v4.0.7
* Updated Lavaplayer to [`2.2.1`](https://github.com/lavalink-devs/lavaplayer/releases/tag/2.2.1)
* Updated spring-boot to `3.3.0` & spring-websocket to `6.1.9`
diff --git a/docs/getting-started/troubleshooting.md b/docs/getting-started/troubleshooting.md
index 554892b2d..a555ce6ce 100644
--- a/docs/getting-started/troubleshooting.md
+++ b/docs/getting-started/troubleshooting.md
@@ -34,14 +34,15 @@ In general there are 6 log levels: `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR` and
```yaml title="application.yml"
logging:
level:
- # Set this to DEBUG to enable more detailed logging. Please note that this will log probably spam your console.
root: INFO
# Set this to DEBUG to enable more detailed logging from Lavalink
lavalink: DEBUG
- # Set this to TRACE to see all WebSocket messages
+ # Set this to TRACE to see all WebSocket messages sent
lavalink.server.io.SocketContext: TRACE
# Log all track exceptions (COMMON, SUSPICIOUS & FAULT)
com.sedmelluq.discord.lavaplayer.tools.ExceptionTools: DEBUG
+ # Log YouTube Plugin stuff (only needed if you have issues with YouTube)
+ dev.lavalink.youtube: DEBUG
# This will log all requests to the REST API
request:
diff --git a/docs/overrides/main.html b/docs/overrides/main.html
index af7d54ba8..ccacc1186 100644
--- a/docs/overrides/main.html
+++ b/docs/overrides/main.html
@@ -1,3 +1,7 @@
+{%- block extrahead -%}
+
+{%- endblock -%}
+
{% extends "base.html" %}
{% block announce %}
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 14cbf4aa8..68eb7f315 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -76,6 +76,7 @@ fun VersionCatalogBuilder.common() {
library("logback", "ch.qos.logback", "logback-classic").version("1.5.6")
library("sentry-logback", "io.sentry", "sentry-logback").version("7.10.0")
library("oshi", "com.github.oshi", "oshi-core").version("6.4.11")
+ library("semver", "io.github.z4kn4fein", "semver").version("2.0.0")
}
fun VersionCatalogBuilder.other() {