tsk-103: Formatting changes

This commit is contained in:
phoenix
2025-02-03 21:15:43 -05:00
parent eb5ae75b0c
commit a08be09472
+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);