[Audio] Lavalink 3.0/3.1 compatibility updates (#2272)

- Update to red-lavalink v0.2.0 (blocked by Cog-Creators/Red-Lavalink#41)
- Force lavalink to use TLSv1.2 on java 11+ (blocked by #2270)

I would add equalizer support, but there's no way to know the full
Lavalink version and thus whether it's supported ahead of time.
This commit is contained in:
Caleb Johnson 2019-01-27 19:43:21 -06:00 committed by Toby Harradine
parent 158c4f741b
commit 348277bcbd
2 changed files with 5 additions and 2 deletions

View File

@ -96,9 +96,12 @@ async def start_lavalink_server(loop):
if not java_available:
raise RuntimeError("You must install Java 1.8+ for Lavalink to run.")
extra_flags = ""
if java_version == (1, 8):
extra_flags = "-Dsun.zip.disableMemoryMapping=true"
elif java_version >= (11, 0):
extra_flags = "-Djdk.tls.client.protocols=TLSv1.2"
else:
extra_flags = ""
from . import LAVALINK_DOWNLOAD_DIR, LAVALINK_JAR_FILE

View File

@ -60,7 +60,7 @@ extras_require = {
"sphinxcontrib-websupport==1.1.0",
"urllib3==1.24.1",
],
"voice": ["red-lavalink==0.1.2"],
"voice": ["red-lavalink==0.2.0"],
"style": ["black==18.9b0", "click==7.0", "toml==0.10.0"],
}