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