#93: Created skeleton for saving flac files

This commit is contained in:
kdeng00
2024-07-09 19:09:37 -04:00
parent 0e04c7910b
commit 470b7a953a
2 changed files with 19 additions and 4 deletions
+4 -1
View File
@@ -274,7 +274,10 @@ public class SongManager : BaseManager
SaveSongToDatabase(song);
}
// TODO: Needs to be implemented
public void SaveFlacSongToFileSystem(IFormFile songFile, IFormFile coverArtData, Song song)
{
}
public async Task<SongData> RetrieveSong(Song songMetaData)
{
+15 -3
View File
@@ -129,10 +129,22 @@ public class SongDataController : BaseController
_logger.LogInformation($"Song title: {song.Title}");
var fileType = meta.FileExtensionType(up.SongData);
// TODO: Identify the song file type. Then save the media.
// Create a new method to save song flac files
_songMgr.SaveSongToFileSystem(up.SongData, up.CoverArtData, song);
switch (fileType)
{
case "wav":
// TODO: Identify the song file type. Then save the media.
// Create a new method to save song flac files
_songMgr.SaveSongToFileSystem(up.SongData, up.CoverArtData, song);
break;
case "flac":
// TODO: Skeleton method
_songMgr.SaveFlacSongToFileSystem(up.SongData, up.CoverArtData, song);
break;
default:
break;
}
}
}
catch (Exception ex)