Skip to content

Commit

Permalink
Merge branch 'v3-legacy' into patch/update-oshi
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 authored Dec 10, 2023
2 parents 1f5d157 + fdeadb0 commit 88e0e4a
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 20 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ jobs:
with:
artifacts: Lavalink.jar
allowUpdates: true
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

Expand Down
20 changes: 11 additions & 9 deletions IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.

<details>
<summary>Example Payload</summary>
Expand All @@ -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
}
}
```
Expand Down
4 changes: 3 additions & 1 deletion LavalinkServer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img align="right" src="/branding/lavalink.svg" width=200 alt="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.
Expand Down Expand Up @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 88e0e4a

Please sign in to comment.