From 6bff36bc03195cc8a87801bbc3c0a9e2e3e1fc43 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 6 Feb 2025 20:09:43 -0500 Subject: [PATCH] CORE-23734: Refactoring --- Icarus/Controllers/Managers/SongManager.cs | 10 +--------- Models/CreateFile.cs | 4 ++-- Models/Song.cs | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Icarus/Controllers/Managers/SongManager.cs b/Icarus/Controllers/Managers/SongManager.cs index db9548e..fed57ac 100644 --- a/Icarus/Controllers/Managers/SongManager.cs +++ b/Icarus/Controllers/Managers/SongManager.cs @@ -8,14 +8,6 @@ using TagLib.Mpeg4; namespace Icarus.Controllers.Managers; -public enum CreateFileResult -{ - Unknown = 0, - AlreadyExists = 1, - FileCreatedAndExists = 2 -} - - public class SongManager : BaseManager { #region Fields @@ -377,7 +369,7 @@ public class SongManager : BaseManager } - public CreateFileResult Create(IFormFile file, string filePath, string prompt) + public Icarus.Models.CreateFileResult Create(IFormFile file, string filePath, string prompt) { if (System.IO.File.Exists(filePath)) { diff --git a/Models/CreateFile.cs b/Models/CreateFile.cs index c0d9c8c..6e16e3d 100644 --- a/Models/CreateFile.cs +++ b/Models/CreateFile.cs @@ -6,6 +6,6 @@ namespace Icarus.Models; public enum CreateFileResult { Unknwon = 0, -AlreadyExists = 1, -FileCreatedAndExists = 2 + AlreadyExists = 1, + FileCreatedAndExists = 2 } \ No newline at end of file diff --git a/Models/Song.cs b/Models/Song.cs index 1404c03..c314adf 100644 --- a/Models/Song.cs +++ b/Models/Song.cs @@ -80,7 +80,7 @@ public class Song { var fullPath = SongDirectory; - if (fullPath![fullPath.Length -1] != '/') + if (fullPath![fullPath.Length - 1] != '/') { fullPath += "/"; }