Fixed .srm, closes #1373
This commit is contained in:
parent
9a744172a9
commit
34b56c6353
@ -480,9 +480,10 @@ namespace NadekoBot.Services.Music
|
||||
lock (locker)
|
||||
{
|
||||
var cur = Queue.Current;
|
||||
var toReturn = Queue.RemoveAt(index);
|
||||
if (cur.Index == index)
|
||||
Next();
|
||||
return Queue.RemoveAt(index);
|
||||
return toReturn;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,11 +95,12 @@ namespace NadekoBot.Services.Music
|
||||
if (index < 0 || index >= Songs.Count)
|
||||
throw new ArgumentOutOfRangeException(nameof(index));
|
||||
|
||||
var current = Songs.First;
|
||||
var current = Songs.First.Value;
|
||||
for (int i = 0; i < Songs.Count; i++)
|
||||
{
|
||||
if (i == index)
|
||||
{
|
||||
current = Songs.ElementAt(index);
|
||||
Songs.Remove(current);
|
||||
if (CurrentIndex != 0)
|
||||
{
|
||||
@ -111,7 +112,7 @@ namespace NadekoBot.Services.Music
|
||||
break;
|
||||
}
|
||||
}
|
||||
return current.Value;
|
||||
return current;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user