fixed .play
This commit is contained in:
parent
45e4816033
commit
b33e4bdd80
@ -125,7 +125,7 @@ namespace NadekoBot.Modules.Music
|
|||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
public Task Play([Remainder]string query = null)
|
public Task Play([Remainder]string query = null)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(query))
|
if (!string.IsNullOrWhiteSpace(query))
|
||||||
try { return Queue(query); } catch (QueueFullException) { return Task.CompletedTask; }
|
try { return Queue(query); } catch (QueueFullException) { return Task.CompletedTask; }
|
||||||
else
|
else
|
||||||
return Next();
|
return Next();
|
||||||
|
@ -232,7 +232,8 @@ namespace NadekoBot.Services.Music
|
|||||||
lock (locker)
|
lock (locker)
|
||||||
{
|
{
|
||||||
manualSkip = true;
|
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;
|
Stopped = false;
|
||||||
Unpause();
|
Unpause();
|
||||||
CancelCurrentSong();
|
CancelCurrentSong();
|
||||||
|
@ -27,7 +27,7 @@ namespace NadekoBot.Services.Music
|
|||||||
this.p = Process.Start(new ProcessStartInfo
|
this.p = Process.Start(new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = "ffmpeg",
|
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,
|
UseShellExecute = false,
|
||||||
RedirectStandardOutput = true,
|
RedirectStandardOutput = true,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
|
Loading…
Reference in New Issue
Block a user