Added playlist logic.

This commit is contained in:
2025-02-16 19:07:07 -05:00
parent 8f3b07543f
commit cccf0b57a5
4 changed files with 228 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
namespace Harmonia.Core.Events;
public enum PlaylistUpdateAction
{
/// <summary>
/// An item was added to the collection.
/// </summary>
Add,
/// <summary>
/// An item was removed from the collection.
/// </summary>
Remove,
/// <summary>
/// An item was moved within the collection.
/// </summary>
Move,
/// <summary>
/// The contents of the collection changed dramatically.
/// </summary>
Reset
}

View File

@@ -0,0 +1,12 @@
using Harmonia.Core.Models;
namespace Harmonia.Core.Events;
public class PlaylistUpdatedEventArgs : EventArgs
{
public required PlaylistUpdateAction Action { get; init; }
public required int Index { get; init; }
public int? NewIndex { get; init; } = -1;
public required int Count { get; init; }
public required PlaylistSong[] Songs { get; init; } = [];
}