removed some unneeded stuff.
This commit is contained in:
parent
b4c42f917b
commit
2784920fa8
@ -4,7 +4,6 @@ using System;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -110,18 +109,7 @@ namespace NadekoBot.Classes.Music
|
|||||||
|
|
||||||
internal async Task Play(IAudioClient voiceClient, CancellationToken cancelToken)
|
internal async Task Play(IAudioClient voiceClient, CancellationToken cancelToken)
|
||||||
{
|
{
|
||||||
var bufferTask = new ConfiguredTaskAwaitable();
|
var bufferTask = BufferSong(cancelToken).ConfigureAwait(false);
|
||||||
try
|
|
||||||
{
|
|
||||||
bufferTask = BufferSong(cancelToken).ConfigureAwait(false);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
var clr = Console.ForegroundColor;
|
|
||||||
Console.ForegroundColor = ConsoleColor.Red;
|
|
||||||
Console.WriteLine($"ERR BUFFER START : {ex.Message}\n{ex}");
|
|
||||||
Console.ForegroundColor = clr;
|
|
||||||
}
|
|
||||||
var bufferAttempts = 0;
|
var bufferAttempts = 0;
|
||||||
const int waitPerAttempt = 500;
|
const int waitPerAttempt = 500;
|
||||||
var toAttemptTimes = SongInfo.ProviderType != MusicType.Normal ? 5 : 9;
|
var toAttemptTimes = SongInfo.ProviderType != MusicType.Normal ? 5 : 9;
|
||||||
|
Loading…
Reference in New Issue
Block a user