Skip to content

Commit 390e654

Browse files
author
Kot
authored
Merge branch 'master' into patch-1
2 parents 23dbbc6 + 8a75701 commit 390e654

File tree

68 files changed

+1026
-3556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1026
-3556
lines changed

.travis.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
language: java
2+
3+
addons:
4+
sonarcloud:
5+
organization: "fredboat"
6+
7+
env:
8+
global:
9+
- BUILD_NUMBER: "$TRAVIS_BUILD_NUMBER"
10+
11+
cache:
12+
directories:
13+
- "$HOME/.m2"
14+
- "$HOME/.gradle"
15+
- ".gradle/wrapper"
16+
- ".gradle/caches"
17+
- "$HOME/.sonar/cache"
18+
19+
stages:
20+
- sonar
21+
22+
jobs:
23+
fast_finish: true
24+
include:
25+
- stage: sonar
26+
jdk: openjdk10
27+
if: env(TRAVIS_SECURE_ENV_VARS) = true
28+
before_script:
29+
#for full sonar cloud blame information
30+
- "git fetch --unshallow"
31+
script:
32+
- "./gradlew sonarqube -PincludeAnalysis"

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Changelog
2+
3+
Each release usually includes various fixes and improvements.
4+
The most noteworthy of these, as well as any features and breaking changes, are listed here.
5+
6+
## v3.0
7+
* **Breaking:** The minimum required Java version to run the server is now Java 10.
8+
**Please note**: Java 10 will be obsolete
9+
as of [September 2018 with the release of Java 11](http://www.java-countdown.xyz/). Expect a Lavalink major version release that will be targetting
10+
Java 11 by that time.
11+
* **Breaking:** Changes to the output of the /loadtracks endpoint. [\#91](https://github.com/Frederikam/Lavalink/pull/91), [\#114](https://github.com/Frederikam/Lavalink/pull/114), [\#116](https://github.com/Frederikam/Lavalink/pull/116)
12+
* **Breaking:** The Java client has been moved to a [new repository](https://github.com/FredBoat/Lavalink-Client).
13+
* **Breaking:** The Java client has been made generic. This is a breaking change so please read the [migration guide](https://github.com/FredBoat/Lavalink-Client#migrating-from-v2-to-v3).
14+
* Better configurable logging. [\#97](https://github.com/Frederikam/Lavalink/pull/97)
15+
* Add custom sentry tags, change sentry dsn configuration location. [\#103](https://github.com/Frederikam/Lavalink/pull/103)
16+
* Add Lavalink version header to websocket handshake. [\#111](https://github.com/Frederikam/Lavalink/pull/111)
17+
* Use git tags for easier version visibility. [\#129](https://github.com/Frederikam/Lavalink/pull/129)
18+
19+
Contributors:
20+
[@Devoxin](https://github.com/Devoxin),
21+
[@Frederikam](https://github.com/Frederikam/),
22+
[@napstr](https://github.com/napstr),
23+
[@SamOphis](https://github.com/SamOphis)
24+
25+
## v2.2
26+
* Lavaplayer updated to 1.3.x [\#115](https://github.com/Frederikam/Lavalink/pull/115)
27+
* Version command line flag [\#121](https://github.com/Frederikam/Lavalink/pull/121)
28+
* Fix race condition in `/loadtracks` endpoint leading to some requests never completing [\#125](https://github.com/Frederikam/Lavalink/pull/125)
29+
30+
Contributors:
31+
[@Devoxin](https://github.com/Devoxin),
32+
[@Frederikam](https://github.com/Frederikam/),
33+
[@napstr](https://github.com/napstr)
34+
35+
## v2.1
36+
* Add prometheus metrics [\#105](https://github.com/Frederikam/Lavalink/pull/105), [\#106](https://github.com/Frederikam/Lavalink/pull/106)
37+
38+
Contributors:
39+
[@Frederikam](https://github.com/Frederikam/),
40+
[@napstr](https://github.com/napstr),
41+
[@Repulser](https://github.com/Repulser/)
42+
43+
## v2.0.1
44+
* Configurable playlist load limit [\#60](https://github.com/Frederikam/Lavalink/pull/60)
45+
* [Docker Releases](https://hub.docker.com/r/fredboat/lavalink/), [\#74](https://github.com/Frederikam/Lavalink/pull/74)
46+
47+
Contributors:
48+
[@Devoxin](https://github.com/Devoxin),
49+
[@Frederikam](https://github.com/Frederikam/),
50+
[@itslukej](https://github.com/itslukej/),
51+
[@napstr](https://github.com/napstr),
52+
[@Repulser](https://github.com/Repulser/)
53+
54+
## v2.0
55+
Please see [here](https://github.com/Frederikam/Lavalink/commit/b8dd3c8a7e186755c1ab343d19a552baecf138e7)
56+
and [here](https://github.com/Frederikam/Lavalink/commit/08a34c99a47a18ade7bd14e6c55ab92348caaa88)

IMPLEMENTATION.md

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Implementation guidelines
2-
How to write your own client. The Java client will serve as an example implementation.
2+
How to write your own client. The Java [Lavalink-Client](https://github.com/FredBoat/Lavalink-Client) will serve as an example implementation.
3+
The Java client has support for JDA, but can also be adapted to work with other JVM libraries.
34

45
## Requirements
56
* You must be able to send messages via a shard's mainWS connection.
@@ -10,8 +11,13 @@ How to write your own client. The Java client will serve as an example implement
1011
* Hybi 10
1112
* Hixie 76
1213
* Hixie 75
13-
14-
## Changes v1.3 -> v2.0
14+
15+
## Significant changes v2.0 -> v3.0
16+
* The response of `/loadtracks` has been completely changed (again since the initial v3.0 pre-release).
17+
* Lavalink v3.0 now reports its version as a handshake response header.
18+
`Lavalink-Major-Version` has a value of `3` for v3.0 only. It's missing for any older version.
19+
20+
## Significant changes v1.3 -> v2.0
1521
With the release of v2.0 many unnecessary ops were removed:
1622

1723
* `connect`
@@ -95,7 +101,7 @@ Make the player seek to a position of the track. Position is in millis
95101
}
96102
```
97103

98-
Set player volume. Volume may range from 0 to 150. 100 is default.
104+
Set player volume. Volume may range from 0 to 1000. 100 is default.
99105
```json
100106
{
101107
"op": "volume",
@@ -116,7 +122,7 @@ and you can send the same VOICE_SERVER_UPDATE to a new node.
116122

117123
### Incoming messages
118124
See
119-
[LavalinkSocket.java](https://github.com/Frederikam/Lavalink/blob/dev/LavalinkClient/src/main/java/lavalink/client/io/LavalinkSocket.java)
125+
[LavalinkSocket.java](https://github.com/FredBoat/Lavalink-Client/blob/master/src/main/java/lavalink/client/io/LavalinkSocket.java)
120126
for client implementation
121127

122128
Position information about a player. Includes unix timestamp.
@@ -225,23 +231,48 @@ Authorization: youshallnotpass
225231

226232
Response:
227233
```json
228-
[
229-
{
230-
"track": "QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRdzR3OVdnWGNRAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZFF3NHc5V2dYY1EAB3lvdXR1YmUAAAAAAAAAAA==",
231-
"info": {
232-
"identifier": "dQw4w9WgXcQ",
233-
"isSeekable": true,
234-
"author": "RickAstleyVEVO",
235-
"length": 212000,
236-
"isStream": false,
237-
"position": 0,
238-
"title": "Rick Astley - Never Gonna Give You Up",
239-
"uri": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
234+
{
235+
"loadType": "TRACK_LOADED",
236+
"playlistInfo": {},
237+
"tracks": [
238+
{
239+
"track": "QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRdzR3OVdnWGNRAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZFF3NHc5V2dYY1EAB3lvdXR1YmUAAAAAAAAAAA==",
240+
"info": {
241+
"identifier": "dQw4w9WgXcQ",
242+
"isSeekable": true,
243+
"author": "RickAstleyVEVO",
244+
"length": 212000,
245+
"isStream": false,
246+
"position": 0,
247+
"title": "Rick Astley - Never Gonna Give You Up",
248+
"uri": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
249+
}
240250
}
241-
}
242-
]
251+
]
252+
}
243253
```
244254

255+
If the identifier leads to a playlist, `playlistInfo` will contain two properties, `name` and `selectedTrack`
256+
```json
257+
{
258+
"loadType": "PLAYLIST_LOADED",
259+
"playlistInfo": {
260+
"name": "Example YouTube Playlist",
261+
"selectedTrack": 3
262+
},
263+
"tracks": [
264+
...
265+
]
266+
}
267+
```
268+
269+
Additionally, in every `/loadtracks` response, a `loadType` property is returned which can be used to judge the response from Lavalink properly. It can be one of the following:
270+
* `TRACK_LOADED` - Returned when a single track is loaded.
271+
* `PLAYLIST_LOADED` - Returned when a playlist is loaded.
272+
* `SEARCH_RESULT` - Returned when a search result is made (i.e `ytsearch: some song`).
273+
* `NO_MATCHES` - Returned if no matches/sources could be found for a given identifier.
274+
* `LOAD_FAILED` - Returned if Lavaplayer failed to load something for some reason.
275+
245276
### Special notes
246277
* When your shard's mainWS connection dies, so does all your lavalink audio connections.
247278
* This also includes resumes

LavalinkClient/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

LavalinkClient/README.md

Lines changed: 0 additions & 124 deletions
This file was deleted.

LavalinkClient/build.gradle

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)