From 7a02ba98336db18fe70da66e4ffd82e356e672cf Mon Sep 17 00:00:00 2001 From: PixelBoom Date: Thu, 15 Jul 2021 00:14:13 -0400 Subject: [PATCH] Code Review Changes --- Shared/PlaylistManager.cs | 13 +------------ Shared/Types/Playlist.cs | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Shared/PlaylistManager.cs b/Shared/PlaylistManager.cs index 3822a8c..ac9dd85 100644 --- a/Shared/PlaylistManager.cs +++ b/Shared/PlaylistManager.cs @@ -809,18 +809,7 @@ public void StorePlaylist(IPlaylist playlist, IPlaylistHandler playlistHandler, if (string.IsNullOrEmpty(fileName)) { // Generate Name - fileName = string.Join("_", playlist.Title - .Replace("/", "") - .Replace("\\", "") - .Replace(".", "") - .Replace(":", "") - .Replace("*", "") - .Replace("?", "") - .Replace("\"", "") - .Replace("<", "") - .Replace(">", "") - .Replace("|", "") - .Split()); + fileName = string.Join("_", string.Join("", playlist.Title.Split(Path.GetInvalidFileNameChars(), StringSplitOptions.RemoveEmptyEntries)).Split()); if (string.IsNullOrEmpty(fileName)) { fileName = "playlist"; diff --git a/Shared/Types/Playlist.cs b/Shared/Types/Playlist.cs index 3b83943..bb4ec09 100644 --- a/Shared/Types/Playlist.cs +++ b/Shared/Types/Playlist.cs @@ -162,7 +162,7 @@ public IPlaylistSong this[int index] public int Count => Songs.Count; /// - public virtual bool IsReadOnly => false; + public virtual bool IsReadOnly => ReadOnly; /// /// Creates a new of type from the given .