#93: Working on build errors, removed DotnetZip dependency, and added new Ionic.Zlip.Netstandard dependency

This commit is contained in:
kdeng00
2024-07-26 19:35:12 -04:00
parent 983b434823
commit 6898776f5b
14 changed files with 104 additions and 91 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ public class AlbumManager : BaseManager
{ {
_config = config; _config = config;
_connectionString = _config.GetConnectionString("DefaultConnection"); _connectionString = _config.GetConnectionString("DefaultConnection");
_albumContext = new AlbumContext(_connectionString); _albumContext = new AlbumContext(_connectionString!);
} }
#endregion #endregion
@@ -89,7 +89,7 @@ public class AlbumManager : BaseManager
oldAlbumTitle.Equals(newAlbumTitle) && oldAlbumArtist.Equals(newAlbumArtist))) oldAlbumTitle.Equals(newAlbumTitle) && oldAlbumArtist.Equals(newAlbumArtist)))
{ {
_logger.Info("No change to the song's album"); _logger.Info("No change to the song's album");
return albumRecord; return albumRecord!;
} }
info = "Change to the song's album"; info = "Change to the song's album";
@@ -137,7 +137,7 @@ public class AlbumManager : BaseManager
private int SongsInAlbum(Album album) private int SongsInAlbum(Album album)
{ {
var sngContext = new SongContext(_connectionString); var sngContext = new SongContext(_connectionString!);
var songs = sngContext.Songs.Where(sng => sng.AlbumId == album.Id).ToList(); var songs = sngContext.Songs.Where(sng => sng.AlbumId == album.Id).ToList();
return songs.Count; return songs.Count;
+2 -2
View File
@@ -7,7 +7,7 @@ public class BaseManager
{ {
#region Fields #region Fields
protected static Logger _logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); protected static Logger _logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger();
protected IConfiguration _config; protected IConfiguration? _config;
protected string _connectionString; protected string? _connectionString;
#endregion #endregion
} }
+1 -1
View File
@@ -78,7 +78,7 @@ public class CoverArtManager : BaseManager
var coverArt = new CoverArt var coverArt = new CoverArt
{ {
SongTitle = song.Title SongTitle = song.Title!
}; };
var segment = coverArt.GenerateFilename(0); var segment = coverArt.GenerateFilename(0);
+8 -8
View File
@@ -187,9 +187,9 @@ public class DirectoryManager : BaseManager
private class DirEnt private class DirEnt
{ {
public string Pre { get; set;} public string? Pre { get; set;}
public string Path { get; set; } public string? Path { get; set; }
public string Post { get; set; } public string? Post { get; set; }
} }
private void GenerateDirectories(List<DirEnt> dirs) private void GenerateDirectories(List<DirEnt> dirs)
@@ -197,7 +197,7 @@ public class DirectoryManager : BaseManager
foreach (var di in dirs) foreach (var di in dirs)
{ {
_logger.Info(di.Pre); _logger.Info(di.Pre);
Directory.CreateDirectory(di.Path); Directory.CreateDirectory(di.Path!);
_logger.Info(di.Post); _logger.Info(di.Post);
} }
} }
@@ -207,10 +207,10 @@ public class DirectoryManager : BaseManager
switch (dirTypes) switch (dirTypes)
{ {
case DirectoryType.Music: case DirectoryType.Music:
_rootSongDirectory = _config.GetValue<string>("RootMusicPath"); _rootSongDirectory = _config!.GetValue<string>("RootMusicPath")!;
break; break;
case DirectoryType.CoverArt: case DirectoryType.CoverArt:
_rootSongDirectory = _config.GetValue<string>("CoverArtPath"); _rootSongDirectory = _config!.GetValue<string>("CoverArtPath")!;
break; break;
} }
} }
@@ -227,7 +227,7 @@ public class DirectoryManager : BaseManager
private string AlbumDirectory(Song song) private string AlbumDirectory(Song song)
{ {
var directory = ArtistDirectory(song); var directory = ArtistDirectory(song);
var segment = SerializeValue(song.AlbumTitle); var segment = SerializeValue(song.AlbumTitle!);
directory += $@"{segment}/"; directory += $@"{segment}/";
Console.WriteLine($"Album directory {directory}"); Console.WriteLine($"Album directory {directory}");
@@ -240,7 +240,7 @@ public class DirectoryManager : BaseManager
private string ArtistDirectory(Song song) private string ArtistDirectory(Song song)
{ {
var directory = _rootSongDirectory; var directory = _rootSongDirectory;
var segment = SerializeValue(song.Artist); var segment = SerializeValue(song.Artist!);
directory += $@"{segment}/"; directory += $@"{segment}/";
Console.WriteLine($"Artist directory {directory}"); Console.WriteLine($"Artist directory {directory}");
+6 -6
View File
@@ -19,7 +19,7 @@ public class GenreManager : BaseManager
{ {
_config = config; _config = config;
_connectionString = _config.GetConnectionString("DefaultConnection"); _connectionString = _config.GetConnectionString("DefaultConnection");
_genreContext = new GenreContext(_connectionString); _genreContext = new GenreContext(_connectionString!);
} }
#endregion #endregion
@@ -93,10 +93,10 @@ public class GenreManager : BaseManager
var existingGenreRecord = _genreContext.Genres.FirstOrDefault(gnr => gnr.GenreName.Equals(oldGenreRecord.GenreName)); var existingGenreRecord = _genreContext.Genres.FirstOrDefault(gnr => gnr.GenreName.Equals(oldGenreRecord.GenreName));
_genreContext.Update(existingGenreRecord); _genreContext.Update(existingGenreRecord!);
_genreContext.SaveChanges(); _genreContext.SaveChanges();
return existingGenreRecord; return existingGenreRecord!;
} }
} }
@@ -110,16 +110,16 @@ public class GenreManager : BaseManager
var genre = _genreContext.Genres.FirstOrDefault(gnr => gnr.GenreName.Equals(song.Genre)); var genre = _genreContext.Genres.FirstOrDefault(gnr => gnr.GenreName.Equals(song.Genre));
if (SongsInGenre(genre) <= 1) if (SongsInGenre(genre!) <= 1)
{ {
_genreContext.Remove(genre); _genreContext.Remove(genre!);
_genreContext.SaveChanges(); _genreContext.SaveChanges();
} }
} }
private int SongsInGenre(Genre genre) private int SongsInGenre(Genre genre)
{ {
var sngContext = new SongContext(_connectionString); var sngContext = new SongContext(_connectionString!);
var songs = sngContext.Songs.Where(sng => sng.GenreId == genre.Id).ToList(); var songs = sngContext.Songs.Where(sng => sng.GenreId == genre.Id).ToList();
return songs.Count; return songs.Count;
+29 -30
View File
@@ -9,11 +9,11 @@ namespace Icarus.Controllers.Managers;
public class SongManager : BaseManager public class SongManager : BaseManager
{ {
#region Fields #region Fields
private string _tempDirectoryRoot; private string? _tempDirectoryRoot;
private string _archiveDirectoryRoot; private string? _archiveDirectoryRoot;
private string _compressedSongFilename; private string? _compressedSongFilename;
private string _message; private string? _message;
private SongContext _songContext; private SongContext? _songContext;
#endregion #endregion
@@ -234,10 +234,10 @@ public class SongManager : BaseManager
} }
} }
var coverMgr = new CoverArtManager(_config); var coverMgr = new CoverArtManager(_config!);
var coverArt = coverMgr.SaveCoverArt(coverArtData, song); var coverArt = coverMgr.SaveCoverArt(coverArtData, song);
DirectoryManager dirMgr = new DirectoryManager(_config, song); DirectoryManager dirMgr = new DirectoryManager(_config!, song);
dirMgr.CreateDirectory(); dirMgr.CreateDirectory();
song.SongDirectory = dirMgr.SongDirectory; song.SongDirectory = dirMgr.SongDirectory;
@@ -262,13 +262,13 @@ public class SongManager : BaseManager
// Save cover art to the database // Save cover art to the database
// Save song to the database // Save song to the database
var coverMgr = new CoverArtManager(_config); var coverMgr = new CoverArtManager(_config!);
var coverArt = coverMgr.SaveCoverArt(coverArtData, song); var coverArt = coverMgr.SaveCoverArt(coverArtData, song);
var meta = new Utilities.MetadataRetriever(); var meta = new Utilities.MetadataRetriever();
meta.UpdateMetadata(song, song); meta.UpdateMetadata(song, song);
DirectoryManager dirMgr = new DirectoryManager(_config, song); DirectoryManager dirMgr = new DirectoryManager(_config!, song);
dirMgr.CreateDirectory(); dirMgr.CreateDirectory();
var tempPath = song.SongPath(); var tempPath = song.SongPath();
@@ -350,7 +350,7 @@ public class SongManager : BaseManager
public async Task<Song> SaveSongTemp(IFormFile songFile) public async Task<Song> SaveSongTemp(IFormFile songFile)
{ {
_logger.Info("Assigning song filename"); _logger.Info("Assigning song filename");
var song = new Song { SongDirectory = this._tempDirectoryRoot }; var song = new Song { SongDirectory = this._tempDirectoryRoot! };
var filename = await song.GenerateFilenameAsync(false) + "-" + songFile.FileName; var filename = await song.GenerateFilenameAsync(false) + "-" + songFile.FileName;
song.Filename = filename; song.Filename = filename;
var songPath = song.SongPath(); var songPath = song.SongPath();
@@ -371,7 +371,6 @@ public class SongManager : BaseManager
// song.SongDirectory = _tempDirectoryRoot; // song.SongDirectory = _tempDirectoryRoot;
song.DateCreated = DateTime.Now; song.DateCreated = DateTime.Now;
// song.Filename = filename;
return song; return song;
} }
@@ -385,9 +384,9 @@ public class SongManager : BaseManager
var currentGenre = currentSong.Genre; var currentGenre = currentSong.Genre;
var currentYear = currentSong.Year; var currentYear = currentSong.Year;
if (!currentTitle.Equals(songUpdates.Title) || !currentArtist.Equals(songUpdates.Artist) || if (!currentTitle!.Equals(songUpdates.Title) || !currentArtist!.Equals(songUpdates.Artist) ||
!currentAlbum.Equals(songUpdates.AlbumTitle) || !currentAlbum!.Equals(songUpdates.AlbumTitle) ||
!currentGenre.Equals(songUpdates.Genre) || currentYear != songUpdates.Year) !currentGenre!.Equals(songUpdates.Genre) || currentYear != songUpdates.Year)
return true; return true;
return false; return false;
@@ -395,7 +394,7 @@ public class SongManager : BaseManager
private void DeleteEmptyDirectories(ref Song oldSong, ref Song updatedSong) private void DeleteEmptyDirectories(ref Song oldSong, ref Song updatedSong)
{ {
DirectoryManager mgr = new DirectoryManager(_config); DirectoryManager mgr = new DirectoryManager(_config!);
_logger.Info("Checking to see if there are any directories to delete"); _logger.Info("Checking to see if there are any directories to delete");
mgr.DeleteEmptyDirectories(oldSong); mgr.DeleteEmptyDirectories(oldSong);
@@ -405,8 +404,8 @@ public class SongManager : BaseManager
{ {
try try
{ {
_connectionString = _config.GetConnectionString("DefaultConnection"); _connectionString = _config!.GetConnectionString("DefaultConnection");
_songContext = new SongContext(_connectionString); _songContext = new SongContext(_connectionString!);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -420,10 +419,10 @@ public class SongManager : BaseManager
{ {
_logger.Info("Starting process to save the song to the database"); _logger.Info("Starting process to save the song to the database");
var albumMgr = new AlbumManager(_config); var albumMgr = new AlbumManager(_config!);
var artistMgr = new ArtistManager(_config); var artistMgr = new ArtistManager(_config!);
var genreMgr = new GenreManager(_config); var genreMgr = new GenreManager(_config!);
var coverMgr = new CoverArtManager(_config); var coverMgr = new CoverArtManager(_config!);
albumMgr.SaveAlbumToDatabase(ref song); albumMgr.SaveAlbumToDatabase(ref song);
artistMgr.SaveArtistToDatabase(ref song); artistMgr.SaveArtistToDatabase(ref song);
genreMgr.SaveGenreToDatabase(ref song); genreMgr.SaveGenreToDatabase(ref song);
@@ -431,10 +430,10 @@ public class SongManager : BaseManager
var info = "Saving Song to DB"; var info = "Saving Song to DB";
_logger.Info(info); _logger.Info(info);
_songContext.Add(song); _songContext!.Add(song);
_songContext.SaveChanges(); _songContext!.SaveChanges();
coverMgr.SaveCoverArtToDatabase(ref song, ref cover); coverMgr.SaveCoverArtToDatabase(ref song, ref cover!);
} }
@@ -479,7 +478,7 @@ public class SongManager : BaseManager
{ {
var updatedSongRecord = oldSongRecord; var updatedSongRecord = oldSongRecord;
var songContext = new SongContext(_connectionString); var songContext = new SongContext(_connectionString!);
if (!SongRecordChanged(oldSongRecord, newSongRecord)) if (!SongRecordChanged(oldSongRecord, newSongRecord))
{ {
@@ -519,17 +518,17 @@ public class SongManager : BaseManager
newSongRecord = updatedSongRecord; newSongRecord = updatedSongRecord;
result.Message = "Successfully updated song"; result.Message = "Successfully updated song";
result.SongTitle = updatedSongRecord.Title; result.SongTitle = updatedSongRecord.Title!;
} }
private void DeleteSongFromDatabase(Song song) private void DeleteSongFromDatabase(Song song)
{ {
_logger.Info("Starting process to delete records related to the song from the database"); _logger.Info("Starting process to delete records related to the song from the database");
var albumMgr = new AlbumManager(_config); var albumMgr = new AlbumManager(_config!);
var artistMgr = new ArtistManager(_config); var artistMgr = new ArtistManager(_config!);
var genreMgr = new GenreManager(_config); var genreMgr = new GenreManager(_config!);
var sngContext = new SongContext(_connectionString); var sngContext = new SongContext(_connectionString!);
sngContext.Songs.Remove(song); sngContext.Songs.Remove(song);
sngContext.SaveChanges(); sngContext.SaveChanges();
artistMgr.DeleteArtistFromDatabase(song); artistMgr.DeleteArtistFromDatabase(song);
+18 -18
View File
@@ -11,12 +11,12 @@ public class MetadataRetriever
private static NLog.Logger _logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); private static NLog.Logger _logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger();
private List<string> _supportedAudioFileTypes = new List<string> {"wav", "flac"}; private List<string> _supportedAudioFileTypes = new List<string> {"wav", "flac"};
private List<string> _supportedImageFileTypes = new List<string> {"jpeg", "jpg", "png"}; private List<string> _supportedImageFileTypes = new List<string> {"jpeg", "jpg", "png"};
private Song _updatedSong; private Song? _updatedSong;
private string _message; private string? _message;
private string _title; private string? _title;
private string _artist; private string? _artist;
private string _album; private string? _album;
private string _genre; private string? _genre;
private int _year; private int _year;
private int _duration; private int _duration;
#endregion #endregion
@@ -197,7 +197,7 @@ public class MetadataRetriever
_logger.Error(msg, "An error occurred in MetadataRetriever"); _logger.Error(msg, "An error occurred in MetadataRetriever");
} }
return null; return [];
} }
@@ -263,43 +263,43 @@ public class MetadataRetriever
switch (key.ToLower()) switch (key.ToLower())
{ {
case "title": case "title":
_updatedSong.Title = title; _updatedSong!.Title = title;
fileTag.Tag.Title = title; fileTag.Tag.Title = title;
break; break;
case "artists": case "artists":
_updatedSong.Artist = artist; _updatedSong!.Artist = artist;
fileTag.Tag.Performers = new []{artist}; fileTag.Tag.Performers = new []{artist};
break; break;
case "album": case "album":
_updatedSong.AlbumTitle = album; _updatedSong!.AlbumTitle = album;
fileTag.Tag.Album = album; fileTag.Tag.Album = album;
break; break;
case "genre": case "genre":
_updatedSong.Genre = genre; _updatedSong!.Genre = genre;
fileTag.Tag.Genres = new []{genre}; fileTag.Tag.Genres = new []{genre};
break; break;
case "year": case "year":
_updatedSong.Year = year; _updatedSong!.Year = year;
fileTag.Tag.Year = (uint)year; fileTag.Tag.Year = (uint)year!;
break; break;
case "albumartist": case "albumartist":
_updatedSong.AlbumArtist = albumArtist; _updatedSong!.AlbumArtist = albumArtist;
fileTag.Tag.AlbumArtists = new []{albumArtist}; fileTag.Tag.AlbumArtists = new []{albumArtist};
break; break;
case "track": case "track":
_updatedSong.Track = track; _updatedSong!.Track = track;
fileTag.Tag.Track = (uint)(track); fileTag.Tag.Track = (uint)(track);
break; break;
case "trackcount": case "trackcount":
_updatedSong.TrackCount = trackCount; _updatedSong!.TrackCount = trackCount;
fileTag.Tag.TrackCount = (uint)(trackCount); fileTag.Tag.TrackCount = (uint)(trackCount);
break; break;
case "disc": case "disc":
_updatedSong.Disc = disc; _updatedSong!.Disc = disc;
fileTag.Tag.Disc = (uint)(disc); fileTag.Tag.Disc = (uint)(disc);
break; break;
case "disccount": case "disccount":
_updatedSong.DiscCount = discCount; _updatedSong!.DiscCount = discCount;
fileTag.Tag.DiscCount = (uint)(discCount); fileTag.Tag.DiscCount = (uint)(discCount);
break; break;
} }
+14 -1
View File
@@ -1,4 +1,4 @@
using Ionic.Zip; // using Ionic.Zip;
using Icarus.Models; using Icarus.Models;
@@ -63,11 +63,24 @@ public class SongCompression
try try
{ {
using (var fi = new FileStream(songDetails.SongPath(), FileMode.Open))
{
using (var z = new Ionic.Zlib.ZlibStream(fi, Ionic.Zlib.CompressionMode.Compress))
{
using (var tr = new FileStream(tmpZipFilePath, FileMode.CreateNew))
{
z.CopyTo(tr);
}
}
}
/*
var f = new Ionic.Zlib.ZlibStream();
using (ZipFile zip = new ZipFile()) using (ZipFile zip = new ZipFile())
{ {
zip.AddFile(songDetails.SongPath()); zip.AddFile(songDetails.SongPath());
zip.Save(tmpZipFilePath); zip.Save(tmpZipFilePath);
} }
*/
Console.WriteLine("Successfully compressed"); Console.WriteLine("Successfully compressed");
} }
+4 -4
View File
@@ -12,8 +12,8 @@ namespace Icarus.Controllers.V1;
public class ArtistController : BaseController public class ArtistController : BaseController
{ {
#region Fields #region Fields
private readonly ILogger<ArtistController> _logger; private readonly ILogger<ArtistController>? _logger;
private string _connectionString; private string? _connectionString;
#endregion #endregion
@@ -35,7 +35,7 @@ public class ArtistController : BaseController
[HttpGet] [HttpGet]
public IActionResult GetArtists() public IActionResult GetArtists()
{ {
var artistContext = new ArtistContext(_connectionString); var artistContext = new ArtistContext(_connectionString!);
var artists = artistContext.Artists.ToList(); var artists = artistContext.Artists.ToList();
@@ -50,7 +50,7 @@ public class ArtistController : BaseController
{ {
Artist artist = new Artist { Id = id }; Artist artist = new Artist { Id = id };
var artistContext = new ArtistContext(_connectionString); var artistContext = new ArtistContext(_connectionString!);
if (artistContext.DoesRecordExist(artist)) if (artistContext.DoesRecordExist(artist))
{ {
+1 -1
View File
@@ -82,7 +82,7 @@ public class CoverArtController : BaseController
var songMetaData = songContext.RetrieveRecord(new Song { Id = id}); var songMetaData = songContext.RetrieveRecord(new Song { Id = id});
var c = covMgr.GetCoverArt(songMetaData); var c = covMgr.GetCoverArt(songMetaData);
var filename = DirectoryManager.GenerateDownloadFilename(10, Constants.FileExtensions.JPG_EXTENSION, songMetaData.Title, randomizeFilename); var filename = DirectoryManager.GenerateDownloadFilename(10, Constants.FileExtensions.JPG_EXTENSION, songMetaData.Title!, randomizeFilename);
var data = await c.GetData(); var data = await c.GetData();
+8 -8
View File
@@ -17,8 +17,8 @@ namespace Icarus.Controllers.V1;
public class LoginController : ControllerBase public class LoginController : ControllerBase
{ {
#region Fields #region Fields
private string _connectionString; private string? _connectionString;
private IConfiguration _config; private IConfiguration? _config;
private ILogger<LoginController> _logger; private ILogger<LoginController> _logger;
#endregion #endregion
@@ -41,7 +41,7 @@ public class LoginController : ControllerBase
[HttpPost] [HttpPost]
public IActionResult Login([FromBody] User user) public IActionResult Login([FromBody] User user)
{ {
var context = new UserContext(_connectionString); var context = new UserContext(_connectionString!);
_logger.LogInformation("Starting process of validating credentials"); _logger.LogInformation("Starting process of validating credentials");
@@ -57,10 +57,10 @@ public class LoginController : ControllerBase
{ {
if (context.Users.FirstOrDefault(usr => usr.Username.Equals(user.Username)) != null) if (context.Users.FirstOrDefault(usr => usr.Username.Equals(user.Username)) != null)
{ {
user = context.Users.FirstOrDefault(usr => usr.Username.Equals(user.Username)); user = context.Users.FirstOrDefault(usr => usr.Username.Equals(user.Username))!;
var validatePass = new PasswordEncryption(); var validatePass = new PasswordEncryption();
var validated = validatePass.VerifyPassword(user, password); var validated = validatePass.VerifyPassword(user!, password);
if (!validated) if (!validated)
{ {
loginRes.Message = message; loginRes.Message = message;
@@ -71,9 +71,9 @@ public class LoginController : ControllerBase
_logger.LogInformation("Successfully validated user credentials"); _logger.LogInformation("Successfully validated user credentials");
TokenManager tk = new TokenManager(_config); TokenManager tk = new TokenManager(_config!);
loginRes = tk.LoginSymmetric(user); loginRes = tk.LoginSymmetric(user!);
return Ok(loginRes); return Ok(loginRes);
} }
@@ -87,7 +87,7 @@ public class LoginController : ControllerBase
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError("An error occurred: {0}", ex.Message); _logger.LogError("An error occurred: {0}", ex.Message);
_logger.LogError("Inner Exception: {0}", ex.InnerException.Message); _logger.LogError("Inner Exception: {0}", ex.InnerException!.Message);
} }
return NotFound(loginRes); return NotFound(loginRes);
+2 -1
View File
@@ -3,6 +3,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<Version>0.1.10</Version> <Version>0.1.10</Version>
</PropertyGroup> </PropertyGroup>
@@ -10,9 +11,9 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="BCrypt.Net-Next" Version="4.0.2" /> <PackageReference Include="BCrypt.Net-Next" Version="4.0.2" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" /> <PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" />
<PackageReference Include="DotNetZip" Version="1.15.0" />
<PackageReference Include="EntityFramework" Version="6.4.4" /> <PackageReference Include="EntityFramework" Version="6.4.4" />
<PackageReference Include="File.TypeChecker" Version="4.1.1" /> <PackageReference Include="File.TypeChecker" Version="4.1.1" />
<PackageReference Include="Iconic.Zlib.Netstandard" Version="1.0.0" />
<PackageReference Include="ID3" Version="0.6.0" /> <PackageReference Include="ID3" Version="0.6.0" />
<PackageReference Include="JWT" Version="10.1.1" /> <PackageReference Include="JWT" Version="10.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
+7 -7
View File
@@ -10,24 +10,24 @@ public class Song
[JsonProperty("id")] [JsonProperty("id")]
public int Id { get; set; } public int Id { get; set; }
[JsonProperty("title")] [JsonProperty("title")]
public string Title { get; set; } public string? Title { get; set; }
[JsonProperty("album")] [JsonProperty("album")]
[Column("Album")] [Column("Album")]
public string AlbumTitle { get; set; } public string? AlbumTitle { get; set; }
[JsonProperty("artist")] [JsonProperty("artist")]
public string Artist { get; set; } public string? Artist { get; set; }
[JsonProperty("album_artist")] [JsonProperty("album_artist")]
public string AlbumArtist { get; set; } public string? AlbumArtist { get; set; }
[JsonProperty("year")] [JsonProperty("year")]
public int? Year { get; set; } public int? Year { get; set; }
[JsonProperty("genre")] [JsonProperty("genre")]
public string Genre { get; set; } public string? Genre { get; set; }
[JsonProperty("duration")] [JsonProperty("duration")]
public int Duration { get; set; } public int Duration { get; set; }
[JsonProperty("filename")] [JsonProperty("filename")]
public string Filename { get; set; } public string? Filename { get; set; }
[JsonIgnore] [JsonIgnore]
public string SongDirectory { get; set; } public string? SongDirectory { get; set; }
[JsonProperty("audio_type")] [JsonProperty("audio_type")]
public string? AudioType { get; set; } public string? AudioType { get; set; }
[JsonProperty("track")] [JsonProperty("track")]
+1 -1
View File
@@ -16,8 +16,8 @@ One can interface with Icarus the music server either by:
* [MySql](https://www.nuget.org/packages/MySql.Data/) * [MySql](https://www.nuget.org/packages/MySql.Data/)
* OpenSSL * OpenSSL
* BCrypt.Net-Next * BCrypt.Net-Next
* DotNetZip
* ID3 * ID3
* Iconic.Zlib.Netstandard
* JWT * JWT
* Microsoft.AspNetCore.Authentication.JwtBearer * Microsoft.AspNetCore.Authentication.JwtBearer
* Microsoft.AspNetCore.Mvc.NewtonsoftJson * Microsoft.AspNetCore.Mvc.NewtonsoftJson