#103: Remove WAV support #105

Merged
kdeng00 merged 12 commits from tsk-103 into master 2025-02-16 17:24:50 -05:00
Showing only changes of commit a08be09472 - Show all commits
+6 -6
View File
@@ -40,23 +40,23 @@ public class SongDataController : BaseController
public IActionResult Download(int id, [FromQuery] bool? randomizeFilename) public IActionResult Download(int id, [FromQuery] bool? randomizeFilename)
{ {
var songContext = new SongContext(_connectionString!); var songContext = new SongContext(_connectionString!);
var songMetaData = songContext.RetrieveRecord(new Song { Id = id}); var songMetaData = songContext.RetrieveRecord(new Song { Id = id });
var song = _songMgr!.RetrieveSong(songMetaData).Result; var song = _songMgr!.RetrieveSong(songMetaData).Result;
string filename; string filename;
switch (songMetaData.AudioType) switch (songMetaData.AudioType)
{ {
case "wav": case "wav":
filename = DirectoryManager.GenerateDownloadFilename(10, Constants.FileExtensions.WAV_EXTENSION, filename = DirectoryManager.GenerateDownloadFilename(10, Constants.FileExtensions.WAV_EXTENSION,
songMetaData.Title!, randomizeFilename); songMetaData.Title!, randomizeFilename);
break; break;
case "flac": case "flac":
filename = DirectoryManager.GenerateDownloadFilename(10, Constants.FileExtensions.FLAC_EXTENSION, filename = DirectoryManager.GenerateDownloadFilename(10, Constants.FileExtensions.FLAC_EXTENSION,
songMetaData.Title!, randomizeFilename); songMetaData.Title!, randomizeFilename);
break; break;
default: default:
filename = DirectoryManager.GenerateDownloadFilename(10, Constants.FileExtensions.DEFAULT_AUDIO_EXTENSION, filename = DirectoryManager.GenerateDownloadFilename(10, Constants.FileExtensions.DEFAULT_AUDIO_EXTENSION,
songMetaData.Title!, randomizeFilename); songMetaData.Title!, randomizeFilename);
break; break;
} }
@@ -178,7 +178,7 @@ public class SongDataController : BaseController
{ {
var songContext = new SongContext(_connectionString!); var songContext = new SongContext(_connectionString!);
var songMetaData = new Song{ Id = id }; var songMetaData = new Song { Id = id };
Console.WriteLine($"Id {songMetaData.Id}"); Console.WriteLine($"Id {songMetaData.Id}");
songMetaData = songContext.RetrieveRecord(songMetaData); songMetaData = songContext.RetrieveRecord(songMetaData);