Added playlist renaming functionality.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user