update listviews
This commit is contained in:
parent
e329811d2d
commit
08931dabff
|
@ -247,15 +247,18 @@ namespace MediaBrowser.Server.Implementations.Playlists
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newIndex > oldIndex)
|
|
||||||
{
|
|
||||||
newIndex--;
|
|
||||||
}
|
|
||||||
|
|
||||||
var item = playlist.LinkedChildren[oldIndex];
|
var item = playlist.LinkedChildren[oldIndex];
|
||||||
|
|
||||||
playlist.LinkedChildren.Remove(item);
|
playlist.LinkedChildren.Remove(item);
|
||||||
|
|
||||||
|
if (newIndex >= playlist.LinkedChildren.Count)
|
||||||
|
{
|
||||||
|
playlist.LinkedChildren.Add(item);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
playlist.LinkedChildren.Insert(newIndex, item);
|
playlist.LinkedChildren.Insert(newIndex, item);
|
||||||
|
}
|
||||||
|
|
||||||
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user