Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/java json api #1

Closed
wants to merge 84 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
9d4165d
Add Lavalink.kt to v4 clients (#918)
DRSchlaubi Jul 15, 2023
afbb146
add discatsharp to libs (#919)
Lulalaby Jul 15, 2023
6ba2986
add jda-nas for linux musl (#920)
topi314 Jul 21, 2023
6672f0d
update lavaplayer to 08cfbc0 - Fixed ogg streaming
topi314 Jul 21, 2023
9ac3eb8
add new config option to readme env vars
topi314 Jul 21, 2023
f543fa9
fixup some readme things
topi314 Jul 21, 2023
83d6f59
readd hardware support section in readme
topi314 Jul 21, 2023
c79ffaa
update changelog for v4.0.0-beta.2
topi314 Jul 21, 2023
30bedca
release v4.0.0-beta.2 (#923)
topi314 Jul 21, 2023
df60936
Merge branch 'master' into dev
topi314 Jul 21, 2023
1bcc3df
Update PLUGINS.md (#924)
DRSchlaubi Jul 27, 2023
fe31640
update lavaplayer version to 74e6c4d728
topi314 Jul 28, 2023
f311e2e
Update README.md
topi314 Aug 2, 2023
e2281a4
Use maven publish plugin (#930)
DRSchlaubi Aug 2, 2023
dd84b42
Merge branch 'master' into dev
topi314 Aug 2, 2023
507b610
add missing env variables in github workflows
topi314 Aug 2, 2023
9d85bed
use lavalink lavaplayer fork 2.0.0 (#931)
topi314 Aug 3, 2023
01b819a
Merge pull request #933 from lavalink-devs/dev
topi314 Aug 3, 2023
6f37eba
Update CHANGELOG.md
topi314 Aug 3, 2023
9d6f2ed
Update frame stats documentation (V4) (#934)
vicky5124 Aug 4, 2023
b8055f3
Add a change request template (#936)
freyacodes Aug 5, 2023
654be72
Make change request form use paragraph fields
freyacodes Aug 5, 2023
96b4d45
Update README.md
topi314 Aug 8, 2023
0f59a5a
add null-check before calling List.indexOf with possible null value t…
topi314 Aug 13, 2023
c299bb6
remove outdated startTime from implementation docs
topi314 Aug 15, 2023
ffa5740
Merge branch 'master' into dev
topi314 Aug 15, 2023
fb66f58
Add lavalink-rs to the list of V4 libraries. (#945)
vicky5124 Aug 16, 2023
29fe5eb
Merge branch 'master' into dev
topi314 Aug 16, 2023
5a56040
add lavalink client (#947)
Tomato6966 Aug 17, 2023
2eaede0
Add FastLink to the clients list (#949)
ThePedroo Aug 19, 2023
8a6c376
add Omissible#isPresent & Omissible#isOmitted
topi314 Aug 20, 2023
a7d1c03
Use contracts for isPresent (#950)
DRSchlaubi Aug 21, 2023
5fa14d0
docs: Add Lavalink4NET to client libraries (#951)
angelobreuer Aug 21, 2023
944df98
add LavaSearch plugin
topi314 Aug 22, 2023
d001bda
add lavalink client (#947)
Tomato6966 Aug 17, 2023
5985d32
Add FastLink to the clients list (#949)
ThePedroo Aug 19, 2023
474a5a0
docs: Add Lavalink4NET to client libraries (#951)
angelobreuer Aug 21, 2023
f90569c
add LavaSearch plugin
topi314 Aug 22, 2023
b38b05d
docs: 📝 Add Riffy to client libraries (#958)
UnschooledGamer Sep 3, 2023
16ca93f
Add Python support to lavalink-rs (#962)
vicky5124 Sep 16, 2023
1e89d5c
Merge branch 'master' into dev
topi314 Sep 27, 2023
64e161d
update lavaplayer to 2.0.2
topi314 Sep 27, 2023
839db58
update changelog
topi314 Sep 27, 2023
2cec7bd
Merge pull request #964 from lavalink-devs/dev
topi314 Sep 27, 2023
8df70c2
add java lavalink-client to README
topi314 Oct 10, 2023
76ef7c7
default lavalink plugin repository (#972)
topi314 Oct 12, 2023
f0c93ed
only seek when player is playing
topi314 Oct 13, 2023
e35993d
Fix GitHub-induced 404 link
freyacodes Oct 16, 2023
380cfb5
update lavaplayer to 2.0.3
topi314 Nov 5, 2023
11a3366
Merge branch 'master' into dev
topi314 Nov 5, 2023
d0880fd
update changelog
topi314 Nov 5, 2023
eac9878
add missing changes to changelog
topi314 Nov 5, 2023
4271d55
Merge pull request #975 from lavalink-devs/dev
topi314 Nov 5, 2023
cb14d44
Add Wavelink to README (#976)
EvieePy Nov 5, 2023
7655511
Clarify error message about incomplete voice state
freyacodes Nov 14, 2023
d685d98
Add logging of Koe gateway errors (#982)
freyacodes Nov 14, 2023
8ab4e48
enable request logging by default
topi314 Nov 20, 2023
c136802
fix NPE when omitting plugin repository
topi314 Nov 27, 2023
3b61c5f
Update to Koe 2.0.0-rc2 (#985)
topi314 Nov 27, 2023
7978e9d
Update Wavelink in README (#986)
EvieePy Nov 27, 2023
b78a956
use maven.lavalink.dev maven repo
topi314 Dec 2, 2023
86348bd
docs (#944)
topi314 Dec 2, 2023
95217d0
Change the default max heap allocation to java default (#955)
ttmx Dec 2, 2023
c2b6b09
allow for deserialization of plugin info into data classes (#987)
topi314 Dec 2, 2023
3c442f3
Allow setting user data on tracks (#983)
topi314 Dec 2, 2023
526c880
add docs for track user data (#984)
topi314 Dec 2, 2023
bd3a25d
Fix typo in field name
freyacodes Dec 2, 2023
e1de5f9
Merge branch 'master' into dev
topi314 Dec 2, 2023
9e33099
update docker ubuntu from 20 to 22
topi314 Dec 2, 2023
8bae18e
exclude old lava-common version
topi314 Dec 3, 2023
2671e02
update lavaplayer to 2.0.4
topi314 Dec 3, 2023
2b95fcf
update repo link to repo.lavalink.dev
topi314 Dec 3, 2023
a93cfba
update changelog
topi314 Dec 3, 2023
3ae0600
update changelog
topi314 Dec 3, 2023
f1a0b6c
update changelog
topi314 Dec 3, 2023
0fd5a33
allow markdown in details
topi314 Dec 3, 2023
8fd6954
allow markdown in details for real this time
topi314 Dec 3, 2023
3732de6
reorder v4 changelog entries
topi314 Dec 3, 2023
ea6f772
Update CHANGELOG.md
topi314 Dec 3, 2023
baec7f7
Update CHANGELOG.md
topi314 Dec 3, 2023
92bffcc
Merge pull request #988 from lavalink-devs/dev
topi314 Dec 3, 2023
678fb30
Update README.md
topi314 Dec 3, 2023
acc6069
Update README.md
topi314 Dec 3, 2023
3121f0c
Add java json API
DRSchlaubi Dec 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/change_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Change Request
description: Request a feature or change
labels: ["enhancement"]
body:
- type: textarea
id: request
attributes:
label: Change request
description: What are you requesting?
validations:
required: true
- type: textarea
id: relevance
attributes:
label: Relevance
description: Is this change relevant to the greater community?
validations:
required: true
- type: textarea
id: plugin
attributes:
label: Could this be a plugin instead?
description: Make your case as to whether this needs to be part of Lavalink itself.
validations:
required: true
- type: checkboxes
attributes:
label: Checklist
options:
- label: I have checked for duplicate issues
required: true
- label: I have checked for existing plugins
required: true
18 changes: 17 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ name: Build
on:
push:
branches: [ '**' ]
paths-ignore: [ '**.md' ]
paths-ignore:
- '**.md'
- 'docs/**'
- '.github/workflows/docs.yml'
- '.github/workflows/docs-pr.yml'
workflow_call:
secrets:
DOCKER_USERNAME:
Expand All @@ -18,6 +22,14 @@ on:
required: false
MAVEN_PASSWORD:
required: false
ORG_GRADLE_PROJECT_mavenCentralPassword:
required: false
ORG_GRADLE_PROJECT_mavenCentralUsername:
required: false
ORG_GRADLE_PROJECT_signingInMemoryKey:
required: false
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword:
required: false

jobs:
build:
Expand All @@ -29,6 +41,10 @@ jobs:
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docs PR

on:
pull_request_target:
branches: [ '**' ]
paths:
- 'docs/**'

concurrency:
group: pages
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v3
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install -r requirements.txt
working-directory: docs
# - run: mkdocs build --verbose --strict
- run: mkdocs build --verbose
working-directory: docs
- uses: actions/upload-pages-artifact@v1
with:
path: 'site'
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
directory: site
branch: pr-${{ github.event.pull_request.number }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docs Push

on:
push:
branches: [ '**' ]
paths:
- 'docs/**'
- '.github/workflows/docs.yml'

concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install -r requirements.txt
working-directory: docs
# - run: mkdocs build --verbose --strict
- run: mkdocs build --verbose
working-directory: docs
- uses: actions/upload-pages-artifact@v1
with:
path: 'site'
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
directory: site
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: '3'
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}

release:
needs: build
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ build/*
gradle.properties
application.yml
LavalinkServer/plugins
.cache/
site/
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,52 @@
Each release usually includes various fixes and improvements.
The most noteworthy of these, as well as any features and breaking changes, are listed here.

## 4.0.0
* Lavalink now requires Java 17 or higher to run
* **Removal of all websocket messages sent by the client. Everything is now done via [REST](../api/rest.md)**
* Remove default 4GB max heap allocation from docker image
* Removal of all `/v3` endpoints except `/version`. All other endpoints are now under `/v4`
* Reworked track loading result. For more info see [here](https://lavalink.dev/api/rest.md#track-loading-result)
* Update docker ubuntu base image from focal(`20`) to jammy(`22`)
* Update to Koe [`2.0.0-rc2`](https://github.com/KyokoBot/koe/releases/tag/2.0.0-rc2)
* Update Lavaplayer to [`2.0.4`](https://github.com/lavalink-devs/lavaplayer/releases/tag/2.0.4), which includes native support for artwork urls and ISRCs in the track info
* Update to the [Protocol Module](https://github.com/lavalink-devs/Lavalink/tree/master/protocol) to support Kotlin/JS
* Allow setting user data on tracks in the REST API. For more info see [here](https://lavalink.dev/api/rest.html#update-player-track)
* Added default plugin repository. Plugin devs can now request their plugin to be added to the default repository. For more info see [here](https://lavalink.dev/api/plugins.md#distributing-your-plugin)
* Addition of full `Track` objects in following events: `TrackStartEvent`, `TrackEndEvent`, `TrackExceptionEvent`, `TrackStuckEvent`
* Resuming a session now requires the `Session-Id` header instead of `Resume-Key` header
* Add JDA-NAS support for musl (`x86-64`, `aarch64`) based systems (most notably `alpine`)
* Add `Omissible#isPresent` & `Omissible#isOmitted` to the `protocol` module
* New config option to specify the directory to load plugins from. `lavalink.pluginsDir` (defaults to `./plugins`)
* Enable request logging by default
* Fixed error when seeking and player is not playing anything in
* Fixed null pointer when a playlist has no selected track

> [!WARNING]
> Lavalink previously set the `-Xmx` flag to `4G` in docker. This caused issues with some systems which had less than 4GB of RAM. We have now removed this flag and let the JVM decide the max heap allocation. The default is 1GB or 25% of total memory, whichever is lower.
> On how to increase the max heap allocation, see [here](https://lavalink.dev/configuration/docker.html#docker).

<details>
<summary>v4.0.0 - Betas</summary>

## 4.0.0-beta.5
* Update lavaplayer to [`2.0.3`](https://github.com/lavalink-devs/lavaplayer/releases/tag/2.0.2) - Fixed YouTube access token errors
* Added default plugin repository. Plugin devs can now request their plugin to be added to the default repository. For more info see [here](https://github.com/lavalink-devs/Lavalink/blob/master/PLUGINS.md#distributing-your-plugin)
* Fixed error when seeking and player is not playing anything in

## 4.0.0-beta.4
* Update lavaplayer to [`2.0.2`](https://github.com/lavalink-devs/lavaplayer/releases/tag/2.0.2) - Support MPEG 2.5 and fixed some requests not timing out
* Add `Omissible#isPresent` & `Omissible#isOmitted` to the `protocol` module
* Fix null pointer when a playlist has no selected track

## 4.0.0-beta.3
* Update lavaplayer to [`2.0.0`](https://github.com/lavalink-devs/lavaplayer/releases/tag/2.0.0) - Fixed YouTube 403 errors & YouTube access token errors

## 4.0.0-beta.2
* Update lavaplayer to [`08cfbc0`](https://github.com/Walkyst/lavaplayer-fork/commit/08cfbc05953128f3cf727ea3bcbe41dabcd1c7db) - Fixed ogg streaming
* Add JDA-NAS support for musl (`x86-64`, `aarch64`) based systems (most notably `alpine`)
* New config option to specify the directory to load plugins from. `lavalink.pluginsDir` (defaults to `./plugins`)

## 4.0.0-beta.1
* New Lavalink now requires Java 17 or higher to run
* **Removal of all websocket messages sent by the client. Everything is now done via [REST](IMPLEMENTATION.md#rest-api)**
Expand All @@ -21,6 +67,23 @@ The most noteworthy of these, as well as any features and breaking changes, are
Contributors:
[@topi314](https://github.com/topi314), [@freyacodes](https://github.com/freyacodes), [@DRSchlaubi](https://github.com/DRSchlaubi) and [@melike2d](https://github.com/melike2d)

</details>

## 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`)

## 3.7.6
* Update Lavaplayer to [`1.4.1`](https://github.com/Walkyst/lavaplayer-fork/releases/tag/1.4.1) & [`1.4.2`](https://github.com/Walkyst/lavaplayer-fork/releases/tag/1.4.2)
* New support for `MUSL` based systems (most notably `alpine`)
Expand Down
11 changes: 8 additions & 3 deletions LavalinkServer/application.yml.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
server: # REST and WS server
port: 2333
address: 0.0.0.0
http2:
enabled: false # Whether to enable HTTP/2 support
plugins:
# name: # Name of the plugin
# some_key: some_value # Some key-value pair for the plugin
# another_key: another_value
lavalink:
plugins:
# - dependency: "group:artifact:version"
# repository: "repository"
pluginsDir: "./plugins"
# - dependency: "com.github.example:example-plugin:1.0.0" # required, the coordinates of your plugin
# repository: "https://maven.example.com/releases" # optional, defaults to the Lavalink releases repository by default
# snapshot: false # optional, defaults to false, used to tell Lavalink to use the snapshot repository instead of the release repository
# pluginsDir: "./plugins" # optional, defaults to "./plugins"
# defaultPluginRepository: "https://maven.lavalink.dev/releases" # optional, defaults to the Lavalink release repository
# defaultPluginSnapshotRepository: "https://maven.lavalink.dev/snapshots" # optional, defaults to the Lavalink snapshot repository
server:
password: "youshallnotpass"
sources:
Expand Down
Loading
Loading