Compare commits
No commits in common. "75185a59c3ff202c46aa98f5b68cc10bf5c2178d" and "99a1417c43f548ce232110680628c4f4e1fb63a9" have entirely different histories.
75185a59c3
...
99a1417c43
@ -13,6 +13,8 @@ plugins:
|
|||||||
# The clients to use for track loading. See below for a list of valid clients.
|
# The clients to use for track loading. See below for a list of valid clients.
|
||||||
# Clients are queried in the order they are given (so the first client is queried first and so on...)
|
# Clients are queried in the order they are given (so the first client is queried first and so on...)
|
||||||
clients:
|
clients:
|
||||||
|
- MUSIC
|
||||||
|
- ANDROID_VR
|
||||||
- WEB
|
- WEB
|
||||||
- WEBEMBEDDED
|
- WEBEMBEDDED
|
||||||
lavalink:
|
lavalink:
|
||||||
|
|||||||
Binary file not shown.
@ -1,50 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Exit immediately if a command exits with a non-zero status.
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Define variables
|
|
||||||
PLUGIN_DIR="./plugins"
|
|
||||||
REPO_URL="https://maven.lavalink.dev/snapshots/dev/lavalink/youtube/youtube-plugin"
|
|
||||||
METADATA_URL="${REPO_URL}/maven-metadata.xml"
|
|
||||||
ARTIFACT_ID="youtube-plugin"
|
|
||||||
|
|
||||||
echo "Fetching latest snapshot version..."
|
|
||||||
|
|
||||||
# Fetch metadata and extract the latest snapshot version using grep and sed
|
|
||||||
# Use curl with -sS for silent operation but show errors
|
|
||||||
# Use grep to find the <latest> tag, then sed to extract the content
|
|
||||||
LATEST_VERSION=$(curl -sS "$METADATA_URL" | grep '<latest>' | sed -e 's/.*<latest>\(.*\)<\/latest>.*/\1/')
|
|
||||||
|
|
||||||
if [ -z "$LATEST_VERSION" ]; then
|
|
||||||
echo "Error: Could not determine the latest snapshot version."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Latest snapshot version: $LATEST_VERSION"
|
|
||||||
|
|
||||||
# Construct the JAR filename and download URL
|
|
||||||
JAR_FILENAME="${ARTIFACT_ID}-${LATEST_VERSION}.jar"
|
|
||||||
DOWNLOAD_URL="${REPO_URL}/${LATEST_VERSION}/${JAR_FILENAME}"
|
|
||||||
|
|
||||||
# Create the plugins directory if it doesn't exist
|
|
||||||
mkdir -p "$PLUGIN_DIR"
|
|
||||||
|
|
||||||
# Remove any existing youtube-plugin JARs to avoid conflicts
|
|
||||||
echo "Removing old plugin versions from $PLUGIN_DIR..."
|
|
||||||
rm -f "$PLUGIN_DIR"/youtube-plugin-*.jar
|
|
||||||
|
|
||||||
# Download the latest snapshot JAR
|
|
||||||
echo "Downloading $JAR_FILENAME from $DOWNLOAD_URL..."
|
|
||||||
curl -L -o "$PLUGIN_DIR/$JAR_FILENAME" "$DOWNLOAD_URL"
|
|
||||||
|
|
||||||
# Verify download
|
|
||||||
if [ ! -f "$PLUGIN_DIR/$JAR_FILENAME" ]; then
|
|
||||||
echo "Error: Failed to download the plugin JAR."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Successfully downloaded $JAR_FILENAME to $PLUGIN_DIR"
|
|
||||||
echo "Make sure to restart your Lavalink container for the changes to take effect."
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
Loading…
x
Reference in New Issue
Block a user