mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2025-01-11 14:07:47 +00:00
Async methods return Tasks instead of void.
This commit is contained in:
parent
dd2b39292a
commit
3e7265a657
@ -22,23 +22,23 @@ namespace SpotifyAPI.Local
|
|||||||
return !string.IsNullOrEmpty(CfidKey);
|
return !string.IsNullOrEmpty(CfidKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal async void SendPauseRequest()
|
internal async Task SendPauseRequest()
|
||||||
{
|
{
|
||||||
await QueryAsync("remote/pause.json?pause=true", true, true, -1);
|
await QueryAsync("remote/pause.json?pause=true", true, true, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal async void SendPlayRequest()
|
internal async Task SendPlayRequest()
|
||||||
{
|
{
|
||||||
await QueryAsync("remote/pause.json?pause=false", true, true, -1);
|
await QueryAsync("remote/pause.json?pause=false", true, true, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal async void SendPlayRequest(string url, string context = "")
|
internal async Task SendPlayRequest(string url, string context = "")
|
||||||
{
|
{
|
||||||
// TODO: instead of having an empty context, one way to fix the bug with the playback time beyond the length of a song would be to provide a 1-song context, and it would be fixed.
|
// TODO: instead of having an empty context, one way to fix the bug with the playback time beyond the length of a song would be to provide a 1-song context, and it would be fixed.
|
||||||
await QueryAsync($"remote/play.json?uri={url}&context={context}", true, true, -1);
|
await QueryAsync($"remote/play.json?uri={url}&context={context}", true, true, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal async void SendQueueRequest(string url)
|
internal async Task SendQueueRequest(string url)
|
||||||
{
|
{
|
||||||
await QueryAsync("remote/play.json?uri=" + url + "?action=queue", true, true, -1);
|
await QueryAsync("remote/play.json?uri=" + url + "?action=queue", true, true, -1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user