Added playlist renaming functionality.

This commit is contained in:
2026-08-03 23:49:21 -04:00
parent de16ac6240
commit cd6f9c382e
8 changed files with 97 additions and 1 deletions

View File

@@ -14,6 +14,24 @@ public class Playlist
public event EventHandler<PlaylistUpdatedEventArgs>? PlaylistUpdated;
public void SetName(string name)
{
if (string.Equals(Name, name, StringComparison.Ordinal))
return;
Name = name;
PlaylistUpdatedEventArgs eventArgs = new()
{
Action = PlaylistUpdateAction.Rename,
Index = -1,
Count = 0,
Songs = []
};
PlaylistUpdated?.Invoke(this, eventArgs);
}
public void Lock()
{
if (IsLocked)

View File

@@ -22,6 +22,7 @@ public enum PlaylistUpdateAction
/// The tags of the songs in the collection were refreshed.
/// </summary>
Refresh,
Rename,
Lock,
Unlock
}