diff --git a/client/src/test/java/jdash/client/GDClientTest.java b/client/src/test/java/jdash/client/GDClientTest.java index 54dee9b..1bd537c 100644 --- a/client/src/test/java/jdash/client/GDClientTest.java +++ b/client/src/test/java/jdash/client/GDClientTest.java @@ -25,7 +25,7 @@ public final class GDClientTest { /* Not part of unit tests, this is only to test the real router implementation */ public static void main(String[] args) { final var client = GDClient.create(); - System.out.println(client.getSongInfo(10007009).block()); + System.out.println(client.getSongInfo(10010067).block()); } @BeforeEach diff --git a/common/src/main/java/jdash/common/internal/InternalUtils.java b/common/src/main/java/jdash/common/internal/InternalUtils.java index 168df95..7350c08 100644 --- a/common/src/main/java/jdash/common/internal/InternalUtils.java +++ b/common/src/main/java/jdash/common/internal/InternalUtils.java @@ -100,7 +100,7 @@ public static Map structureSongsInfo(String songsInfoRD) { Objects.equals(data.get(SONG_NG_SCOUTED), "1"), Optional.ofNullable(urlDecode(data.get(SONG_URL))).filter(not(String::isEmpty)), MusicLibraryProvider.parse(data.get(SONG_PROVIDER_ID)), - toList(data.get(SONG_OTHER_ARTIST_IDS), 0, Long::parseLong).orElse(List.of()) + toList(data.get(SONG_OTHER_ARTIST_IDS), 0, Long::parseLong, "\\.").orElse(List.of()) )); } @@ -313,14 +313,14 @@ public static GDUserProfile buildUserProfile(Map data) { } private static Optional> toIntList(String str, int minSize) { - return toList(str, minSize, Integer::parseInt); + return toList(str, minSize, Integer::parseInt, ","); } - private static Optional> toList(String str, int minSize, Function parser) { + private static Optional> toList(String str, int minSize, Function parser, String sep) { if (str == null || str.isEmpty()) { return Optional.empty(); } - return Optional.of(Arrays.stream(str.split(",")).map(parser).toList()) + return Optional.of(Arrays.stream(str.split(sep)).map(parser).toList()) .filter(values -> values.size() >= minSize); } diff --git a/website/yarn.lock b/website/yarn.lock index 490822a..d40df68 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -8316,14 +8316,14 @@ write-file-atomic@^3.0.3: typedarray-to-buffer "^3.1.5" ws@^7.3.1: - version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity "sha1-WLXCDcKBYz9sGRE/ObNJvYvVWNk= sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==" ws@^8.13.0: - version "8.17.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" - integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity "sha1-kpPaUwu1SP68lTcdkPnIeHJ9kZs= sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==" xdg-basedir@^5.0.1, xdg-basedir@^5.1.0: version "5.1.0"