Skip to content

Commit

Permalink
upgrade to net 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Colombo authored and Federico Colombo committed Oct 30, 2024
1 parent ae089a7 commit 56e66f9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
16 changes: 8 additions & 8 deletions SpleeterAPI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<UserSecretsId>770f53e5-6b9c-4a58-b73c-528f7f74dc1d</UserSecretsId>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AspNetCoreModuleName>AspNetCoreModuleV2</AspNetCoreModuleName>
Expand Down Expand Up @@ -68,13 +68,13 @@

<ItemGroup>
<PackageReference Include="IpData" Version="2.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.9.5" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0" />
<PackageReference Include="Audit.NET" Version="14.8.0" />
<PackageReference Include="Audit.NET.Udp" Version="14.8.0" />
<PackageReference Include="Audit.WebApi" Version="14.8.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.6" />
<PackageReference Include="Audit.NET" Version="27.1.1" />
<PackageReference Include="Audit.NET.Udp" Version="27.1.1" />
<PackageReference Include="Audit.WebApi.Core" Version="27.1.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Split/GeoLocationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public static string GetGeoLocation(string ip)

public static async Task<IpInfo> GetIpInfo(string ip)
{
IpInfo info;
if (!_ipInfoCache.TryGetValue(ip, out info))
IpInfo info = null;
if (ip.Length > 5 && !_ipInfoCache.TryGetValue(ip, out info))
{
info = await _client.Lookup(ip);
_ipInfoCache.TryAdd(ip, info);
Expand Down
8 changes: 5 additions & 3 deletions Startup/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using System.IO;
using Microsoft.OpenApi.Models;
using System.Linq;
using System.Text.Json.Serialization;

namespace SpleeterAPI
{
Expand Down Expand Up @@ -41,7 +42,7 @@ public void ConfigureServices(IServiceCollection services)

services.AddControllers()
.AddJsonOptions(json => {
json.JsonSerializerOptions.IgnoreNullValues = true;
json.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
json.JsonSerializerOptions.WriteIndented = true;
});

Expand Down Expand Up @@ -142,10 +143,11 @@ public static void EphemeralLog(string text, bool important)
}

Console.WriteLine(text);
Audit.Core.AuditScope.CreateAndSave("Ephemeral", new { Status = text });
Audit.Core.AuditScope.Log("Ephemeral", new { Status = text });
}

private static object _fleLogLocker = new object();
private static readonly object _fleLogLocker = new object();

public static void FileLog(string text, bool noAppend = false)
{
var logFile = GetFileLogPath();
Expand Down
10 changes: 5 additions & 5 deletions appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
},
"Kestrel": {
"Certificates": {
"Default": {
"Subject": "spl.eastus.cloudapp.azure.com",
"Store": "Root",
"Location": "LocalMachine"
}
//"Default": {
// "Subject": "spl.eastus.cloudapp.azure.com",
// "Store": "Root",
// "Location": "LocalMachine"
//}
}
},
"AllowedHosts": "*"
Expand Down
6 changes: 3 additions & 3 deletions docs/splitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ var buttonSplit = $("#btn-split");

var max_duration_mins = 30;

var split_yt_api = 'https://spl.eastus.cloudapp.azure.com/yt';
var split_test_api = 'https://spl.eastus.cloudapp.azure.com/test';
var split_mp3_api = 'https://spl.eastus.cloudapp.azure.com/mp3';
var split_yt_api = 'https://localhost:7280/yt';
var split_test_api = 'https://localhost:7280/test';
var split_mp3_api = 'https://localhost:7280/mp3';

var selectedFiles = [];
var dropzone;
Expand Down

0 comments on commit 56e66f9

Please sign in to comment.