From 410cf5edbfd7f3276db2d17edfb8395fc4d3c268 Mon Sep 17 00:00:00 2001 From: upo <> Date: Thu, 20 Jun 2024 23:09:32 +0200 Subject: [PATCH 1/3] Fix for SeekAsync In SeekAsync only the miliseconds were passed, instead of total miliseconds --- src/LavaPlayerExtensions.cs | 2 +- src/Rest/Payloads/UpdatePlayerPayload.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LavaPlayerExtensions.cs b/src/LavaPlayerExtensions.cs index 360fedd2..719625f5 100644 --- a/src/LavaPlayerExtensions.cs +++ b/src/LavaPlayerExtensions.cs @@ -188,7 +188,7 @@ public static async ValueTask SeekAsync(this LavaPlayer where TLavaPlayer : LavaPlayer { await lavaNode.UpdatePlayerAsync( lavaPlayer.GuildId, - updatePayload: new UpdatePlayerPayload(Position: seekPosition.Milliseconds)); + updatePayload: new UpdatePlayerPayload(Position: seekPosition.TotalMilliseconds)); } /// diff --git a/src/Rest/Payloads/UpdatePlayerPayload.cs b/src/Rest/Payloads/UpdatePlayerPayload.cs index 0c82a64c..a6d1c581 100644 --- a/src/Rest/Payloads/UpdatePlayerPayload.cs +++ b/src/Rest/Payloads/UpdatePlayerPayload.cs @@ -11,7 +11,7 @@ public readonly record struct UpdatePlayerPayload( [property: JsonPropertyName("identifier")] string Identifier = default, [property: JsonPropertyName("position")] - int Position = default, + double Position = default, [property: JsonPropertyName("endTime")] int EndTime = default, [property: JsonPropertyName("volume")] From 6365d766cfb9cfe051c9166c7f0b13a7496b0678 Mon Sep 17 00:00:00 2001 From: upo <> Date: Thu, 20 Jun 2024 23:25:48 +0200 Subject: [PATCH 2/3] Update Victoria.csproj --- src/Victoria.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Victoria.csproj b/src/Victoria.csproj index a49ce241..cd337472 100644 --- a/src/Victoria.csproj +++ b/src/Victoria.csproj @@ -7,7 +7,7 @@ - 7.0.4 + 7.0.5 Victoria Yucked; Contributors 2018 - 2024 Yucked. All rights reserved. From e1752f53b0ee2a2c11e395e5614ba27ade72000d Mon Sep 17 00:00:00 2001 From: upo <> Date: Fri, 21 Jun 2024 00:00:48 +0200 Subject: [PATCH 3/3] Adjusted value types --- src/LavaPlayerExtensions.cs | 2 +- src/Rest/Payloads/UpdatePlayerPayload.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LavaPlayerExtensions.cs b/src/LavaPlayerExtensions.cs index 719625f5..56bb24e4 100644 --- a/src/LavaPlayerExtensions.cs +++ b/src/LavaPlayerExtensions.cs @@ -188,7 +188,7 @@ public static async ValueTask SeekAsync(this LavaPlayer where TLavaPlayer : LavaPlayer { await lavaNode.UpdatePlayerAsync( lavaPlayer.GuildId, - updatePayload: new UpdatePlayerPayload(Position: seekPosition.TotalMilliseconds)); + updatePayload: new UpdatePlayerPayload(Position: (int)seekPosition.TotalMilliseconds)); } /// diff --git a/src/Rest/Payloads/UpdatePlayerPayload.cs b/src/Rest/Payloads/UpdatePlayerPayload.cs index a6d1c581..0c82a64c 100644 --- a/src/Rest/Payloads/UpdatePlayerPayload.cs +++ b/src/Rest/Payloads/UpdatePlayerPayload.cs @@ -11,7 +11,7 @@ public readonly record struct UpdatePlayerPayload( [property: JsonPropertyName("identifier")] string Identifier = default, [property: JsonPropertyName("position")] - double Position = default, + int Position = default, [property: JsonPropertyName("endTime")] int EndTime = default, [property: JsonPropertyName("volume")]