34 lines
986 B
C#
34 lines
986 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using SharpExifTool;
|
|
|
|
namespace Shadow.Controllers
|
|
{
|
|
[ApiController]
|
|
[Route("[controller]")]
|
|
public class WeatherForecastController : ControllerBase
|
|
{
|
|
private static readonly string[] Summaries =
|
|
[
|
|
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
|
];
|
|
|
|
[HttpGet(Name = "GetWeatherForecast")]
|
|
//public async Task<IEnumerable<WeatherForecast>> Get()
|
|
public async Task<WeatherForecast> Get()
|
|
{
|
|
using (var exiftool = new ExifTool())
|
|
{
|
|
//var test = await exiftool.ExtractAllMetadataAsync(filename: "C:\\Path\\to\\file.flac/.mp3/.m4a/.ogg");
|
|
return new WeatherForecast();
|
|
}
|
|
//return Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
|
//{
|
|
// Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
|
|
// TemperatureC = Random.Shared.Next(-20, 55),
|
|
// Summary = Summaries[Random.Shared.Next(Summaries.Length)]
|
|
//})
|
|
//.ToArray();
|
|
}
|
|
}
|
|
}
|