From 1b2737b9a01a213201cdf9d01be0845dccca61a3 Mon Sep 17 00:00:00 2001
From: Kosugi_kun <33971692+kosugikun@users.noreply.github.com>
Date: Sat, 30 Jul 2022 22:00:05 +0900
Subject: [PATCH] =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3?=
=?UTF-8?q?=E7=95=AA=E5=8F=B7=E3=81=AE=E5=A4=89=E6=9B=B4=20=E3=83=AD?=
=?UTF-8?q?=E3=82=B0=E3=83=AC=E3=83=99=E3=83=AB=E3=81=AE=E5=A4=89=E6=9B=B4?=
=?UTF-8?q?=20=E5=86=8D=E7=94=9F=E5=BE=85=E3=81=A1=E4=B8=80=E8=A6=A7?=
=?UTF-8?q?=E8=A1=A8=E7=A4=BA=E6=99=82=E3=81=AB=E3=83=AD=E3=83=BC=E3=82=AB?=
=?UTF-8?q?=E3=83=AB=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=8C=E3=81=82?=
=?UTF-8?q?=E3=81=A3=E3=81=9F=E5=A0=B4=E5=90=88=E3=81=AB=E7=99=BA=E7=94=9F?=
=?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=84=E3=81=9F=E4=B8=8D=E5=85=B7=E5=90=88?=
=?UTF-8?q?=E3=81=AE=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 2 +-
.../java/com/jagrosh/jmusicbot/audio/QueuedTrack.java | 7 ++++++-
src/main/resources/logback.xml | 8 ++++----
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/pom.xml b/pom.xml
index 0cf54de7f..a3c0800c2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.jagrosh
JMusicBot
- 0.6.9
+ 0.7.0
jar
diff --git a/src/main/java/com/jagrosh/jmusicbot/audio/QueuedTrack.java b/src/main/java/com/jagrosh/jmusicbot/audio/QueuedTrack.java
index e3eeae5cc..9166c4b6d 100644
--- a/src/main/java/com/jagrosh/jmusicbot/audio/QueuedTrack.java
+++ b/src/main/java/com/jagrosh/jmusicbot/audio/QueuedTrack.java
@@ -18,6 +18,7 @@
import com.jagrosh.jmusicbot.queue.Queueable;
import com.jagrosh.jmusicbot.utils.FormatUtil;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
+import com.sedmelluq.discord.lavaplayer.track.AudioTrackInfo;
import dev.cosgy.agent.GensokyoInfoAgent;
import dev.cosgy.agent.objects.ResultSet;
import net.dv8tion.jda.api.entities.User;
@@ -64,6 +65,10 @@ public String toString() {
data.getMisc().getCirclelink();
return "`[" + FormatUtil.formatTime(data.getSongtimes().getDuration()) + "]` [**" + title + "**](" + titleUrl + ") - <@" + track.getUserData(RequestMetadata.class).getOwner() + ">";
}
- return "`[" + FormatUtil.formatTime(track.getDuration()) + "]` [**" + track.getInfo().title + "**](" + track.getInfo().uri + ") - <@" + track.getUserData(RequestMetadata.class).getOwner() + ">";
+
+ String entry = "`[" + FormatUtil.formatTime(track.getDuration()) + "]` ";
+ AudioTrackInfo trackInfo = track.getInfo();
+ entry = entry + (trackInfo.uri.startsWith("http") ? "[**" + trackInfo.title + "**]("+trackInfo.uri+")" : "**" + trackInfo.title + "**");
+ return entry + " - <@" + track.getUserData(RequestMetadata.class).getOwner() + ">";
}
}
diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml
index 549d02034..fcdf35195 100644
--- a/src/main/resources/logback.xml
+++ b/src/main/resources/logback.xml
@@ -40,18 +40,18 @@
-
+
-
+