* .NET 8 migration

* Fixed bugs with song management

* More cleanup and making some constants

* Updated yml

* Clean up

Removing comments, some cleanup, and moving the startup code into Program.cs

* Removing comments

* Fixed song deletion issue

* Added functionality to delete song directories

* Updated README
This commit was merged in pull request #89.
This commit is contained in:
Kun Deng
2024-06-15 12:17:12 -04:00
committed by GitHub
parent ececcb5ba3
commit 23c50de468
22 changed files with 182 additions and 454 deletions
-11
View File
@@ -4,8 +4,6 @@ using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Icarus.Controllers.Managers;
namespace Icarus.Controllers.V1;
@@ -39,14 +37,5 @@ public class BaseController : ControllerBase
return token;
}
[ApiExplorerSettings(IgnoreApi = true)]
[Obsolete("Asymmetric key signing for tokens have been deprecated")]
protected bool IsTokenValid(string scope)
{
var token = ParseBearerTokenFromHeader();
var tokMgr = new TokenManager(_config);
return tokMgr.IsTokenValid(scope, token);
}
#endregion
}
+1 -1
View File
@@ -148,7 +148,7 @@ public class SongDataController : BaseController
_songMgr.DeleteSong(songMetaData);
return Ok();
return Ok(songMetaData);
}
}
+6 -1
View File
@@ -53,7 +53,12 @@ public class SongStreamController : BaseController
var stream = new FileStream(song.SongPath(), FileMode.Open, FileAccess.Read);
stream.Position = 0;
var filename = $"{song.Title}.mp3";
var filename = song.Filename;
if (string.IsNullOrEmpty(song.Filename))
{
filename = song.GenerateFilename();
}
_logger.LogInformation("Starting to stream song...>");
Console.WriteLine("Starting to streamsong...");