diff --git a/Controllers/Managers/SongManager.cs b/Controllers/Managers/SongManager.cs index f9704c7..92b3ee6 100644 --- a/Controllers/Managers/SongManager.cs +++ b/Controllers/Managers/SongManager.cs @@ -252,7 +252,6 @@ public class SongManager : BaseManager return song; } - // TODO: Needs to be implemented public Song SaveFlacSongToFileSystem(IFormFile songFile, IFormFile coverArtData, Song song) { // Save temp song (Should already be saved to the filesystem by the time it gets to this method) @@ -360,16 +359,7 @@ public class SongManager : BaseManager _logger.Info("Saving temp song: {0}", songPath); await songFile.CopyToAsync(filestream); } - // For audio files that already contain embedded metadata - /* - await Task.Run(() => - { - MetadataRetriever meta = new MetadataRetriever(); - song = meta.RetrieveMetaData(song.SongPath()); - }); - */ - // song.SongDirectory = _tempDirectoryRoot; song.DateCreated = DateTime.Now; return song; diff --git a/Controllers/Utilities/SongCompression.cs b/Controllers/Utilities/SongCompression.cs index a1681a6..ea72b2c 100644 --- a/Controllers/Utilities/SongCompression.cs +++ b/Controllers/Utilities/SongCompression.cs @@ -1,5 +1,3 @@ -// using Ionic.Zip; - using Icarus.Models; namespace Icarus.Controllers.Utilities; @@ -73,14 +71,6 @@ public class SongCompression } } } - /* - var f = new Ionic.Zlib.ZlibStream(); - using (ZipFile zip = new ZipFile()) - { - zip.AddFile(songDetails.SongPath()); - zip.Save(tmpZipFilePath); - } - */ Console.WriteLine("Successfully compressed"); } diff --git a/Controllers/v1/SongDataController.cs b/Controllers/v1/SongDataController.cs index df967ab..dd9e271 100644 --- a/Controllers/v1/SongDataController.cs +++ b/Controllers/v1/SongDataController.cs @@ -81,17 +81,14 @@ public class SongDataController : BaseController { try { - // Console.WriteLine("Uploading song..."); _logger!.LogInformation("Uploading song..."); var uploads = _songTempDir; - // Console.WriteLine($"Song Root Path {uploads}"); _logger!.LogInformation($"Song root path {uploads}"); foreach (var sng in songData) if (sng.Length > 0) { - // Console.WriteLine($"Song filename {sng.FileName}"); _logger!.LogInformation($"Song filename {sng.FileName}"); _songMgr!.SaveSongToFileSystem(sng).Wait(); @@ -154,12 +151,9 @@ public class SongDataController : BaseController switch (song.AudioType) { case "wav": - // TODO: Identify the song file type. Then save the media. - // Create a new method to save song flac files song = _songMgr.SaveSongToFileSystem(up.SongData, up.CoverArtData, song); break; case "flac": - // TODO: Skeleton method song = _songMgr.SaveFlacSongToFileSystem(up.SongData, up.CoverArtData, song); break; default: