fixed .play
This commit is contained in:
parent
45e4816033
commit
b33e4bdd80
@ -125,7 +125,7 @@ namespace NadekoBot.Modules.Music
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public Task Play([Remainder]string query = null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(query))
|
||||
if (!string.IsNullOrWhiteSpace(query))
|
||||
try { return Queue(query); } catch (QueueFullException) { return Task.CompletedTask; }
|
||||
else
|
||||
return Next();
|
||||
|
@ -232,7 +232,8 @@ namespace NadekoBot.Services.Music
|
||||
lock (locker)
|
||||
{
|
||||
manualSkip = true;
|
||||
Queue.Next(skipCount - 1);
|
||||
// if player is stopped, and user uses .n, it should play current song.
|
||||
// It's a bit weird, but that's the least annoying solution
|
||||
Stopped = false;
|
||||
Unpause();
|
||||
CancelCurrentSong();
|
||||
|
@ -27,7 +27,7 @@ namespace NadekoBot.Services.Music
|
||||
this.p = Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = "ffmpeg",
|
||||
Arguments = $"-ss 0 -i {songUri} -f s16le -ar 48000 -vn -ac 2 pipe:1 -loglevel quiet",
|
||||
Arguments = $"-i {songUri} -f s16le -ar 48000 -vn -ac 2 pipe:1 -loglevel quiet",
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
|
Loading…
Reference in New Issue
Block a user