-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix track decoding API calls #157
Conversation
src/Rest/DecodedLavaTrack.cs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must we add another LavaTrack? My idea was to use TrackDeserializer to des the response into LavaTrack
ArgumentNullException.ThrowIfNull(trackHash); | ||
var responseMessage = await _httpClient.GetAsync($"/{_version}/decodetrack?encodedTrack={trackHash}"); | ||
var responseMessage = await _httpClient.GetAsync($"/{_version}/decodetrack?encodedTrack={HttpUtility.UrlEncode(trackHash)}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't trackHash already an encoded string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least on both TrackEndEventArg
and TrackStartEventArg
, encodedTrack
isn't URL-safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Track obj
Line 100 in 7e93e94
public object PluginInfo { get; internal set; } |
…rter, added LavaTrackListConverter
…cifically, LavaTrackListConverter now reuses LavaTrackConverter
DecodedLavaTrack
class, which represents the JSON object returned byGET /v4/decodetrack
and the elements in the array returned byPOST /v4/decodetracks
LavaNode.DecodeTrackAsync
andLavaNode.DecodeTracksAsync
to use and returnDecodedLavaTrack
LavaNode.DecodeTrackAsync
LavaNode.DecodeTracksAsync
http-request as indicated by Lavalink docs