Skip to content

Commit

Permalink
Merge pull request #766 from freyacodes/dev
Browse files Browse the repository at this point in the history
v3.6.0 release
  • Loading branch information
freyacodes authored Oct 12, 2022
2 parents 8f307c8 + 47e5901 commit db242da
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 10 deletions.
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,54 @@
Each release usually includes various fixes and improvements.
The most noteworthy of these, as well as any features and breaking changes, are listed here.

## 3.6.0
* new userId & clientName getters in the plugin-api. For more info see [here](https://github.com/freyacodes/Lavalink/pull/743).

Contributors:
[@melike2d](https://github.com/melike2d)

## 3.5.1
* update udpqueue.rs to `0.2.5` which fixes crashes when ipv6 is disabled
* fix null socketContext in `IPlayer` for plugins
* new `ping` field in player update. see https://github.com/freyacodes/Lavalink/pull/738 for more info

Contributors:
[@TopiSenpai](https://github.com/TopiSenpai),
[@Devoxin](https://github.com/Devoxin), and
[@freyacodes](https://github.com/freyacodes)

## 3.5
* New plugin system. For more info see [here](https://github.com/freyacodes/Lavalink/blob/master/PLUGINS.md).
* Add support for HTTP proxying via httpConfig. For more info see [here](https://github.com/freyacodes/Lavalink/pull/595).
* Update koe version to 2.0.0-rc1.
- this fixes the WebSocketClosedEvent with code 1006 problem.
* Fix error when enabling timescale and lowpass filters.
* Fix player not playing after moving between voice chats or changing regions.
* Fix guild ids sent as numbers in json.
* Fix missing timescale natives.
* Fix setting endMarkerHit to correctly set FINISHED as the reason.
* Undeprecation of the `volume` property in the `play` OP.
* Configurable track stuck threshold. For more info see [here](https://github.com/freyacodes/Lavalink/pull/676).
* Add JDA-NAS support for more CPU Architectures. For more info see [here](https://github.com/freyacodes/Lavalink/pull/692). Big thanks goes to @MinnDevelopment here.
* Update lavaplayer to [`1.3.98.4`](https://github.com/Walkyst/lavaplayer-fork/releases/tag/1.3.98.4) which fixes the latest yt cipher issues and age restricted tracks

Contributors:
[@freyacodes](https://github.com/freyacodes),
[@davidffa](https://github.com/davidffa),
[@Walkyst](https://github.com/Walkyst),
[@TopiSenpai](https://github.com/TopiSenpai),
[@duncte123](https://github.com/duncte123),
[@Kodehawa](https://github.com/Kodehawa),
[@Devoxin](https://github.com/Devoxin),
[@Muh9049](https://github.com/Muh9049),
[@melike2d](https://github.com/melike2d),
[@ToxicMushroom](https://github.com/ToxicMushroom),
[@mooner1022](https://github.com/mooner1022),
[@rohank05](https://github.com/rohank05),
[@Fabricio20](https://github.com/Fabricio20),
[@TheEssemm](https://github.com/TheEssemm), and
[@jack1142](https://github.com/jack1142)

## 3.4
* New filters system
* Deprecation of `TrackExceptionEvent.error`, replaced by `TrackExceptionEvent.exception`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public class AppInfo {
private final String version;
private final String groupId;
private final String artifactId;
private final String buildNumber;
private final long buildTime;

public AppInfo() {
Expand All @@ -35,7 +34,6 @@ public AppInfo() {
this.version = prop.getProperty("version");
this.groupId = prop.getProperty("groupId");
this.artifactId = prop.getProperty("artifactId");
this.buildNumber = prop.getProperty("buildNumber");
long bTime = -1L;
try {
bTime = Long.parseLong(prop.getProperty("buildTime"));
Expand All @@ -55,15 +53,11 @@ public String getArtifactId() {
return this.artifactId;
}

public String getBuildNumber() {
return this.buildNumber;
}

public long getBuildTime() {
return this.buildTime;
}

public String getVersionBuild() {
return this.version + "_" + this.buildNumber;
return this.version;
}
}
11 changes: 10 additions & 1 deletion LavalinkServer/src/main/java/lavalink/server/io/SocketContext.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class SocketContext(
val serverConfig: ServerConfig,
private var session: WebSocketSession,
private val socketServer: SocketServer,
val userId: String,
private val userId: String,
private val clientName: String?,
val koe: KoeClient,
eventHandlers: Collection<PluginEventHandler>,
webSocketExtensions: List<WebSocketExtension>,
Expand Down Expand Up @@ -105,6 +106,14 @@ class SocketContext(

fun getPlayer(guildId: String) = getPlayer(guildId.toLong())

override fun getUserId(): Long {
return userId.toLong()
}

override fun getClientName(): String? {
return clientName
}

override fun getPlayer(guildId: Long) = players.computeIfAbsent(guildId) {
val player = Player(this, guildId, audioPlayerManager, serverConfig)
eventEmitter.onNewPlayer(player)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class SocketServer(
session,
this,
userId,
clientName,
koe.newClient(userId.toLong()),
eventHandlers,
webSocketExtensions,
Expand Down Expand Up @@ -176,4 +177,4 @@ class SocketServer(
}

internal fun canResume(key: String) = resumableSessions[key]?.stopResumeTimeout() ?: false
}
}
2 changes: 1 addition & 1 deletion plugin-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

val archivesBaseName = "plugin-api"
group = "dev.arbjerg.lavalink"
version = "0.9.0"
version = "3.6.0"

dependencies {
compileOnly(libs.spring.boot)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
package dev.arbjerg.lavalink.api;

import org.json.JSONObject;
import org.springframework.lang.Nullable;

import java.util.Map;

/**
* Represents a WebSocket connection
*/
public interface ISocketContext {
/**
* @return the User ID of the Client.
*/
long getUserId();

/**
* @return the name of the Client, or null if it was not specified.
*/
@Nullable
String getClientName();

/**
* Returns the player of a guild. Never returns null.
*
Expand Down

0 comments on commit db242da

Please sign in to comment.