Removed unused code.
This commit is contained in:
@@ -6,27 +6,6 @@ public class PlaylistRepository : JsonFileRepository<Playlist>, IPlaylistReposit
|
||||
{
|
||||
protected override string DirectoryName => Path.Combine("Playlists");
|
||||
|
||||
//public PlaylistRepository()
|
||||
//{
|
||||
// List<Playlist> playlists = Get();
|
||||
|
||||
// foreach (Playlist playlist in playlists)
|
||||
// {
|
||||
// playlist.PlaylistUpdated += OnPlaylistUpdated;
|
||||
// }
|
||||
|
||||
// if (playlists.Count == 0)
|
||||
// AddPlaylist();
|
||||
//}
|
||||
|
||||
//private void OnPlaylistUpdated(object? sender, PlaylistUpdatedEventArgs e)
|
||||
//{
|
||||
// if (sender is not Playlist playlist)
|
||||
// return;
|
||||
|
||||
// Save(playlist);
|
||||
//}
|
||||
|
||||
public Playlist? GetPlaylist(PlaylistSong playlistSong)
|
||||
{
|
||||
return Get().FirstOrDefault(playlist => playlist.Songs.Contains(playlistSong));
|
||||
@@ -45,28 +24,4 @@ public class PlaylistRepository : JsonFileRepository<Playlist>, IPlaylistReposit
|
||||
|
||||
throw new Exception("Unable to determine new fileName");
|
||||
}
|
||||
|
||||
//public event EventHandler<PlaylistAddedEventArgs>? PlaylistAdded;
|
||||
//public event EventHandler<PlaylistRemovedEventArgs>? PlaylistRemoved;
|
||||
|
||||
//public void AddPlaylist()
|
||||
//{
|
||||
// Playlist playlist = new()
|
||||
// {
|
||||
// Name = "New Playlist"
|
||||
// };
|
||||
|
||||
// playlist.PlaylistUpdated += OnPlaylistUpdated;
|
||||
|
||||
// Save(playlist);
|
||||
// PlaylistAdded?.Invoke(this, new(playlist));
|
||||
//}
|
||||
|
||||
//public void RemovePlaylist(Playlist playlist)
|
||||
//{
|
||||
// playlist.PlaylistUpdated -= OnPlaylistUpdated;
|
||||
|
||||
// Delete(playlist);
|
||||
// PlaylistRemoved?.Invoke(this, new(playlist));
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user