Updated Entity Framework to 2.2.6, Removed PrintCredentials() Method call on login, working on #55
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
@@ -92,6 +93,8 @@ namespace Icarus.Controllers.Managers
|
||||
_logger.Error(msg, "An error occurred");
|
||||
}
|
||||
}
|
||||
[DllImport("libicarus.so")]
|
||||
public static extern void create_directory(SongManager.Sng song);
|
||||
public void DeleteEmptyDirectories()
|
||||
{
|
||||
try
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
@@ -364,7 +365,12 @@ namespace Icarus.Controllers.Managers
|
||||
DirectoryManager dirMgr = new DirectoryManager(_config, song);
|
||||
dirMgr.CreateDirectory();
|
||||
|
||||
var sng = ConvertSongToSng(song);
|
||||
|
||||
DirectoryManager.create_directory(sng);
|
||||
|
||||
System.IO.File.Delete(fileTempPath);
|
||||
Environment.Exit(1);
|
||||
|
||||
var filePath = dirMgr.SongDirectory;
|
||||
var songFilename = songFile.FileName;
|
||||
@@ -501,7 +507,19 @@ namespace Icarus.Controllers.Managers
|
||||
return song;
|
||||
}
|
||||
|
||||
|
||||
private Sng ConvertSongToSng(Song song)
|
||||
{
|
||||
return new Sng
|
||||
{
|
||||
Id = song.Id,
|
||||
Title = song.Title,
|
||||
Artist = song.Artist,
|
||||
Album = song.AlbumTitle,
|
||||
Genre = song.Genre,
|
||||
Year = song.Year.Value
|
||||
};
|
||||
}
|
||||
|
||||
private Song RetrieveMetaData(string filePath)
|
||||
{
|
||||
Song newSong = new Song
|
||||
@@ -1219,5 +1237,19 @@ namespace Icarus.Controllers.Managers
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Structs
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Sng
|
||||
{
|
||||
public int Id;
|
||||
public string Title;
|
||||
public string Artist;
|
||||
public string Album;
|
||||
public string Genre;
|
||||
public int Year;
|
||||
};
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,8 +90,6 @@ namespace Icarus.Controllers.Managers
|
||||
_audience = _config["Auth0:ApiIdentifier"];
|
||||
_grantType = "client_credentials";
|
||||
_url = $"https://{_config["Auth0:Domain"]}";
|
||||
|
||||
PrintCredentials();
|
||||
}
|
||||
|
||||
#region Testing Methods
|
||||
|
||||
Reference in New Issue
Block a user